Panduan memulai: Membuat data lake

Dokumen ini menunjukkan cara mulai menggunakan Dataplex Universal Catalog di konsolGoogle Cloud dengan memandu Anda membuat data lake, menambahkan zona, dan melampirkan aset.

Sebelum memulai

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Google Cloud project.

  4. Enable the Dataplex Universal Catalog, Dataproc, Dataproc Metastore, BigQuery, and Cloud Storage APIs.

    Enable the APIs

  5. Make sure that you have the following role or roles on the project: roles/dataplex.admin, roles/dataplex.editor

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      Buka IAM
    2. Pilih project.
    3. Klik Berikan akses.
    4. Di kolom Akun utama baru, masukkan ID pengguna Anda. Biasanya berupa alamat email untuk Akun Google.

    5. Di daftar Pilih peran, pilih peran.
    6. Untuk memberikan peran tambahan, klik Tambahkan peran lain, lalu tambahkan setiap peran tambahan.
    7. Klik Simpan.
  6. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  7. Make sure that billing is enabled for your Google Cloud project.

  8. Enable the Dataplex Universal Catalog, Dataproc, Dataproc Metastore, BigQuery, and Cloud Storage APIs.

    Enable the APIs

  9. Make sure that you have the following role or roles on the project: roles/dataplex.admin, roles/dataplex.editor

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      Buka IAM
    2. Pilih project.
    3. Klik Berikan akses.
    4. Di kolom Akun utama baru, masukkan ID pengguna Anda. Biasanya berupa alamat email untuk Akun Google.

    5. Di daftar Pilih peran, pilih peran.
    6. Untuk memberikan peran tambahan, klik Tambahkan peran lain, lalu tambahkan setiap peran tambahan.
    7. Klik Simpan.
  10. Buat bucket Cloud Storage:
    1. In the Google Cloud console, go to the Cloud Storage Buckets page.

      Go to Buckets

    2. Click Create.
    3. On the Create a bucket page, enter your bucket information. To go to the next step, click Continue.
      1. For Name your bucket, enter a unique bucket name. Don't include sensitive information in the bucket name, because the bucket namespace is global and publicly visible.
      2. In the Choose where to store your data section, do the following:
        1. Select a Location type.
        2. Choose a location where your bucket's data is permanently stored from the Location type drop-down menu.
        3. To set up cross-bucket replication, select Add cross-bucket replication via Storage Transfer Service and follow these steps:

          Set up cross-bucket replication

          1. In the Bucket menu, select a bucket.
          2. In the Replication settings section, click Configure to configure settings for the replication job.

            The Configure cross-bucket replication pane appears.

            • To filter objects to replicate by object name prefix, enter a prefix that you want to include or exclude objects from, then click Add a prefix.
            • To set a storage class for the replicated objects, select a storage class from the Storage class menu. If you skip this step, the replicated objects will use the destination bucket's storage class by default.
            • Click Done.
      3. In the Choose how to store your data section, do the following:
        1. In the Set a default class section, select the following: Standard.
        2. To enable hierarchical namespace, in the Optimize storage for data-intensive workloads section, select Enable hierarchical namespace on this bucket.
      4. In the Choose how to control access to objects section, select whether or not your bucket enforces public access prevention, and select an access control method for your bucket's objects.
      5. In the Choose how to protect object data section, do the following:
        • Select any of the options under Data protection that you want to set for your bucket.
          • To enable soft delete, click the Soft delete policy (For data recovery) checkbox, and specify the number of days you want to retain objects after deletion.
          • To set Object Versioning, click the Object versioning (For version control) checkbox, and specify the maximum number of versions per object and the number of days after which the noncurrent versions expire.
          • To enable the retention policy on objects and buckets, click the Retention (For compliance) checkbox, and then do the following:
            • To enable Object Retention Lock, click the Enable object retention checkbox.
            • To enable Bucket Lock, click the Set bucket retention policy checkbox, and choose a unit of time and a length of time for your retention period.
        • To choose how your object data will be encrypted, expand the Data encryption section (), and select a Data encryption method.
    4. Click Create.

Membuat data lake

Data lake adalah konstruksi logis yang merepresentasikan domain data atau unit bisnis. Misalnya, jika Anda perlu mengatur data berdasarkan penggunaan grup, Anda akan membuat data lake untuk setiap departemen (misalnya, retail, penjualan, dan keuangan).

Langkah-langkah berikut menunjukkan cara membuat lake menggunakan konsol Google Cloud .

  1. Buka Dataplex Universal Catalog di konsol Google Cloud .

    Buka Katalog Universal Dataplex

  2. Buka tampilan Kelola.

  3. Klik Create.

  4. Masukkan Nama tampilan.

  5. ID danau dibuat secara otomatis untuk Anda.

  6. Tentukan Region tempat pembuatan lake.

    Untuk lake yang dibuat di region tertentu (misalnya, us-central1), data single-region (us-central1) dan data multi-region (us multi-region) dapat dilampirkan, bergantung pada setelan zona.

  7. Klik Buat.

Menambahkan zona ke data lake

Setelah membuat data lake, Anda dapat menambahkan zona ke data lake. Zona adalah pengelompokan logis dalam data lake, yang berguna untuk mengategorikan data terstruktur dan tidak terstruktur.

  1. Di tampilan Manage, klik nama data lake yang ingin Anda tambahi zona.

  2. Klik Add zone.

  3. Masukkan Nama tampilan untuk zona Anda.

  4. Klik drop-down Jenis. Pilih Zona Mentah atau Zona Terkurasi. Pelajari lebih lanjut jenis zona.

  5. Di bagian Lokasi data, pilih Regional atau Multi-regional. Pilihan Anda tidak dapat diubah nanti. Data satu region dan multi-region tidak dapat digabungkan dalam zona yang sama.

  6. Klik Buat.

Diperlukan waktu beberapa menit untuk membuat zona.

Menghubungkan aset

Data dapat disimpan di bucket Cloud Storage atau set data BigQuery, dan dapat dilampirkan sebagai aset ke zona data dalam data lake Dataplex Universal Catalog.

Untuk melampirkan bucket Cloud Storage sebagai aset, ikuti langkah-langkah berikut:

  1. Di tampilan Manage, klik nama data lake yang ingin Anda hubungkan dengan bucket Cloud Storage.

  2. Di tab Zona, klik zona untuk menambahkan aset.

  3. Di tab Aset, klik Tambahkan Aset.

  4. Klik Add an asset.

  5. Di bagian Type, pilih Storage bucket.

  6. Di bagian Nama tampilan, masukkan nama untuk aset.

  7. Di kolom Bucket, klik Browse. Jika Anda memiliki bucket Cloud Storage, temukan bucket tersebut, lalu klik Pilih. Jika Anda tidak memiliki bucket Cloud Storage, Anda dapat membuatnya dengan mengklik tombol .

    1. Masukkan nama unik untuk bucket. Klik Lanjutkan.

    2. Pilih Jenis lokasi. Klik Lanjutkan.

    3. Pilih kelas penyimpanan default untuk data Anda. Klik Lanjutkan.

    4. Pilih tingkat kontrol akses. Klik Lanjutkan.

    5. Pilih opsi perlindungan data atau Tidak ada. Klik Lanjutkan.

    6. Klik Buat.

    7. Klik Select.

  8. Klik Selesai.

  9. Klik Lanjutkan.

  10. Di bagian Discovery settings, pilih Inherit untuk mewarisi Discovery settings dari tingkat zona.

  11. Klik Lanjutkan.

  12. Di bagian Tambahkan aset, klik Kirim.

Tunggu hingga Pembuatan aset selesai.

Untuk menggunakan danau Anda, lihat bagian Langkah berikutnya. Jika tidak, hapus resource yang Anda buat dengan mengikuti langkah-langkah pembersihan. bagian.

Pembersihan

Agar akun Google Cloud Anda tidak dikenai biaya untuk resource yang digunakan pada halaman ini, ikuti langkah-langkah berikut.

  1. In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  2. If the project that you plan to delete is attached to an organization, expand the Organization list in the Name column.
  3. In the project list, select the project that you want to delete, and then click Delete.
  4. In the dialog, type the project ID, and then click Shut down to delete the project.

Atau, Anda dapat menghapus resource yang digunakan dalam tutorial ini. Lake tidak akan dihapus hingga Anda menghapus semua resource zona datanya. Demikian pula, zona data tidak akan dihapus kecuali Anda menghapus semua resource asetnya.

Lepaskan bucket penyimpanan

Untuk melepaskan aset Katalog Universal Dataplex yang Anda buat, ikuti langkah-langkah berikut:

  1. Buka Dataplex Universal Catalog di konsol Google Cloud .

    Buka Katalog Universal Dataplex

  2. Di tampilan Manage, klik nama data lake yang Anda buat.

  3. Di tab Zones, klik nama zona yang Anda buat.

  4. Di tab Aset, pilih aset yang akan dilepas dengan mencentang kotak di sebelah kiri nama bucket.

  5. Klik Hapus Aset.

  6. Klik Hapus untuk mengonfirmasi pelepasan.

Menghapus zona

Untuk menghapus zona Dataplex Universal Catalog yang Anda buat, ikuti langkah-langkah berikut:

  1. Buka Dataplex Universal Catalog di konsol Google Cloud .

    Buka Katalog Universal Dataplex

  2. Di tampilan Manage, klik data lake yang Anda buat.

  3. Di tab Zones, pilih zona yang akan dihapus dengan mencentang kotak di sebelah kiri nama zona data.

  4. Klik Hapus Zona.

  5. Klik Delete untuk mengonfirmasi penghapusan.

Menghapus data lake

Langkah-langkah berikut menunjukkan cara menghapus danau Katalog Universal Dataplex yang Anda buat.

  1. Buka Dataplex Universal Catalog di konsol Google Cloud .

    Buka Katalog Universal Dataplex

  2. Di tampilan Manage, klik data lake yang Anda buat.

  3. Di bagian atas halaman, klik Delete.

  4. Konfirmasi penghapusan dengan mengetik "delete" di kolom.

  5. Klik Hapus Danau untuk mengonfirmasi penghapusan.

Langkah berikutnya