0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Dataplex にて他プロジェクトの BigQuery のテーブルに対して Data Profile を実施する方法

Posted at

概要

Dataplex にて他プロジェクトの BigQuery のテーブルに対して Data Profile を実施する方法を共有します。

Data Profile 作成時に別のテーブルを指定することができますが、権限不足であるというエラーが発生します。

An error occurred while creating the profile. Please try again.
Permission denied for Dataplex Service Agent (service-241625037743@gcp-sa-dataplex.iam.gserviceaccount.com) to access source BigQuery table [project:publisher-01, dataset:publisher01, table:sample_01]. Dataplex Service Agent should have bigquery.tables.get permission for the specified table to create a DataScan for it. Please grant bigquery.tables.get permission for the specified table via appropriate IAM roles e.g. BigQuery Data Viewer.

image.png

Dataplex Service Agent (Dataplex サービス アカウント)にアクセス権を付与が必要であるとドキュメントに記載されています。本記事では、その対応方法を提示します。ただし、付与するロールがBigQuery Data Editorであることから最小限の権限でない可能性があることに注意してください。

image.png

BigQuery テーブルとデータ プロファイル スキャンが異なるプロジェクトにある場合、Dataplex サービス アカウントに、対応する BigQuery テーブルの読み取り権限を付与する必要があります。

引用元:データ プロファイル スキャンを作成して使用する | Dataplex | Google Cloud

エラーの再現方法

1. Dataplex にてProfile -> CREATE DATA PROFILE SCANを選択

image.png

2. Define scanにてIDに適当な名前を入力し、tableに他のプロジェクトのテーブルを指定してCONTINUEを選択

image.png

3. Additional settings (optional)をデフォルトのままでCREATEを選択

image.png

4. エラーとなることを確認

An error occurred while creating the profile. Please try again.
Permission denied for Dataplex Service Agent (service-241625037743@gcp-sa-dataplex.iam.gserviceaccount.com) to access source BigQuery table [project:publisher-01, dataset:publisher01, table:sample_01]. Dataplex Service Agent should have bigquery.tables.get permission for the specified table to create a DataScan for it. Please grant bigquery.tables.get permission for the specified table via appropriate IAM roles e.g. BigQuery Data Viewer.

image.png

エラーへの対応方法

1. Dataplex Service Agent に対して Scan 対象のオブジェクトへの権限付与を実施する方法

1-1. IAM & Admin -> IAMを選択し、GRANT ACCESSを選択

image.png

1-2. Add prinpalsにて Dataplex Service Agent を指定し、Assign rolesにてBigQuery Data Editorを選びSAVEを選択

image.png

1-3. Dataplex の画面に戻り、CREATEを再度選択

image.png

1-4. Data Profile が作成されたことを確認し、RUN NOWを選択

image.png

1-5. 処理が完了することを確認

image.png

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?