前提条件と設定

リネージのユースケース チュートリアルを完了するには、次の設定を行います。

  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.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  4. Enable the BigQuery, Data lineage , Dataform, BigQuery Data Transfer, and Secret Manager APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

    For new projects, the BigQuery API is automatically enabled.

必要なロール

リネージのユースケース チュートリアルを行うために必要な権限を取得するには、プロジェクトに対する次の IAM ロールを付与するよう管理者に依頼してください。

  • データリネージ閲覧者roles/datalineage.viewer): リネージが記録および表示されるプロジェクトに対するロール。
  • BigQuery データ閲覧者roles/bigquery.dataViewer): テーブルのストレージ プロジェクトに対するロール。
  • BigQuery リソース閲覧者roles/bigquery.resourceViewer): ジョブのコンピューティング プロジェクトに対するロール。
  • Dataplex Catalog 閲覧者roles/dataplex.catalogViewer): カタログ エントリが保存されるプロジェクトに対するロール。
  • Dataform 編集者roles/dataform.editor): ワークスペースとリポジトリがあるプロジェクトに対するロール。

必要なロールに関連付けられたプロジェクト タイプとサービスは次のとおりです。

  • ストレージ プロジェクトには、BigQuery のデータセットとテーブルが保存されます。
  • コンピューティング プロジェクトは、データを処理し、リネージ メタデータを保存します。BigQuery ジョブとデータ変換の実行に使用されます。
  • カタログ エントリには、テーブルを記述するメタデータが含まれています。これにより、基盤となるデータにアクセスせずにテーブルを検索して整理できます。
  • リネージ プロジェクトは、データの履歴とその変換を記録して可視化します。
  • Dataform は、SQL ベースのデータ パイプラインの構築、バージョン管理、実行に使用されるサービスです。未加工のデータをクリーンでドキュメント化されたデータセットに変換します。

ロールの付与については、プロジェクト、フォルダ、組織へのアクセス権の管理をご覧ください。必要な権限は、カスタムロールや他の事前定義ロールから取得することもできます。

使ってみる

チュートリアルを完了するには、データリネージのユースケース リポジトリを使用します。このリポジトリには、データセットを設定してデータ変換を実行するための事前定義コードが含まれています。

データセットの概要

各チュートリアルでは、医療機関、雇用、ビジネスデータなど、さまざまな実際のデータセットを使用して、現実的なシナリオでデータリネージを示します。

データセットを設定する

データリネージでデータの変更をトラッキングするには、次の設定を 1 回行います。

  1. 個人用アクセス トークンを作成して Secret Manager に保存します。
  2. リポジトリを Dataform にリンクします。

設定後、データ変換を実行してデータを処理し、リネージを生成します。