From eb219d5a7c36058fd8f738330808576ec3e48eac Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 29 Nov 2026 22:36:39 +0000 Subject: [PATCH 1/4] docs: BigQuery Data Lineage API permission for column-level lineage Co-Authored-By: Itamar Hartstein --- docs/snippets/cloud/integrations/bigquery.mdx | 1 + docs/snippets/dwh/bigquery/cloud_wif.mdx | 14 ++++++++++++++ .../grant_user_access_on_dataset_level.mdx | 14 ++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/docs/snippets/cloud/integrations/bigquery.mdx b/docs/snippets/cloud/integrations/bigquery.mdx index a3d661837..56a118e3e 100644 --- a/docs/snippets/cloud/integrations/bigquery.mdx +++ b/docs/snippets/cloud/integrations/bigquery.mdx @@ -28,6 +28,7 @@ Select a tab below and follow the steps for your chosen method. For BigQuery, this translates to: - **BigQuery Data Viewer** on the Elementary dataset (for reading Elementary schema data). - **BigQuery Metadata Viewer** and **BigQuery Resource Viewer** at the **project level** (for reading `INFORMATION_SCHEMA.JOBS` query history and table metadata). These project-level roles are required for BI integrations like Hex that rely on query history. +- Optionally, **Data Lineage Viewer** at the **project level**, with the Data Lineage API enabled (for column-level lineage from BigQuery jobs). ### Fill the connection form diff --git a/docs/snippets/dwh/bigquery/cloud_wif.mdx b/docs/snippets/dwh/bigquery/cloud_wif.mdx index 0045f673d..77cbe2248 100644 --- a/docs/snippets/dwh/bigquery/cloud_wif.mdx +++ b/docs/snippets/dwh/bigquery/cloud_wif.mdx @@ -33,6 +33,20 @@ - **BigQuery Metadata Viewer** - **BigQuery Resource Viewer** +### Optional: grant access to the Data Lineage API + +Elementary uses the [Data Lineage API](https://cloud.google.com/dataplex/docs/about-data-lineage) for column-level lineage built from your BigQuery jobs. Without it, Elementary still builds table-level lineage from `INFORMATION_SCHEMA.JOBS`. + +In **every project where your pipelines run queries**: + +1. Enable the Data Lineage API: open [the API page](https://console.cloud.google.com/apis/library/datalineage.googleapis.com) and click **"Enable"**, or run: + ```bash + gcloud services enable datalineage.googleapis.com --project=PROJECT_ID + ``` +2. In [IAM & Admin](https://console.cloud.google.com/iam-admin/iam), grant the principalSet from step 4 the role **"Data Lineage Viewer"** (`roles/datalineage.viewer`) at the project level. + +BigQuery records lineage in the project where each job runs, so a missing role or a disabled API in one project only removes column-level lineage for the jobs that ran there. + ### Grant principal access to specific datasets: 6. In the [BigQuery console](https://console.cloud.google.com/bigquery), find your Elementary dataset in the 'Explorer' tab. Click the three dots next to it > Share > ADD PRINCIPAL. Paste the same principalSet from step 4, select `BigQuery Data Viewer`, and save. If your dbt dataset is in a different project, also grant it `BigQuery Metadata Viewer` and `BigQuery Resource Viewer`. diff --git a/docs/snippets/dwh/bigquery/grant_user_access_on_dataset_level.mdx b/docs/snippets/dwh/bigquery/grant_user_access_on_dataset_level.mdx index fec0be6fb..151027d08 100644 --- a/docs/snippets/dwh/bigquery/grant_user_access_on_dataset_level.mdx +++ b/docs/snippets/dwh/bigquery/grant_user_access_on_dataset_level.mdx @@ -27,6 +27,20 @@ These roles are required for Elementary to read query history (`INFORMATION_SCHE 5. **Repeat for any additional GCP projects** referenced in your dbt sources or used by BI tools (e.g., Hex, Looker) for query execution. +#### Optional: grant access to the Data Lineage API + +Elementary uses the [Data Lineage API](https://cloud.google.com/dataplex/docs/about-data-lineage) for column-level lineage built from your BigQuery jobs. Without it, Elementary still builds table-level lineage from `INFORMATION_SCHEMA.JOBS`. + +In **every project where your pipelines run queries**: + +1. Enable the Data Lineage API: open [the API page](https://console.cloud.google.com/apis/library/datalineage.googleapis.com) and click **"Enable"**, or run: + ```bash + gcloud services enable datalineage.googleapis.com --project=PROJECT_ID + ``` +2. In [IAM & Admin](https://console.cloud.google.com/iam-admin/iam), grant the Elementary service account the role **"Data Lineage Viewer"** (`roles/datalineage.viewer`) at the project level. + +BigQuery records lineage in the project where each job runs, so a missing role or a disabled API in one project only removes column-level lineage for the jobs that ran there. + #### Step 2: Grant dataset-level role on the Elementary dataset This role provides read access to your Elementary schema data. From e855b210c16045166c2619ad3f5660134ea00b91 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 29 Nov 2026 22:40:23 +0000 Subject: [PATCH 2/4] docs: share the Data Lineage API steps and note the credentials project Co-Authored-By: Itamar Hartstein --- docs/snippets/dwh/bigquery/cloud_wif.mdx | 14 +++----------- .../dwh/bigquery/data_lineage_permissions.mdx | 13 +++++++++++++ .../grant_user_access_on_dataset_level.mdx | 14 +++----------- 3 files changed, 19 insertions(+), 22 deletions(-) create mode 100644 docs/snippets/dwh/bigquery/data_lineage_permissions.mdx diff --git a/docs/snippets/dwh/bigquery/cloud_wif.mdx b/docs/snippets/dwh/bigquery/cloud_wif.mdx index 77cbe2248..13ce79803 100644 --- a/docs/snippets/dwh/bigquery/cloud_wif.mdx +++ b/docs/snippets/dwh/bigquery/cloud_wif.mdx @@ -1,3 +1,5 @@ +import DataLineagePermissions from '/snippets/dwh/bigquery/data_lineage_permissions.mdx'; + ### Create a Workload Identity pool and provider: 1. In the Cloud Console, go to: IAM & Admin > Workload Identity Federation. Click 'CREATE POOL' (or select an existing pool), give it a name (e.g. `elementary-identity-pool`), and continue. @@ -35,17 +37,7 @@ ### Optional: grant access to the Data Lineage API -Elementary uses the [Data Lineage API](https://cloud.google.com/dataplex/docs/about-data-lineage) for column-level lineage built from your BigQuery jobs. Without it, Elementary still builds table-level lineage from `INFORMATION_SCHEMA.JOBS`. - -In **every project where your pipelines run queries**: - -1. Enable the Data Lineage API: open [the API page](https://console.cloud.google.com/apis/library/datalineage.googleapis.com) and click **"Enable"**, or run: - ```bash - gcloud services enable datalineage.googleapis.com --project=PROJECT_ID - ``` -2. In [IAM & Admin](https://console.cloud.google.com/iam-admin/iam), grant the principalSet from step 4 the role **"Data Lineage Viewer"** (`roles/datalineage.viewer`) at the project level. - -BigQuery records lineage in the project where each job runs, so a missing role or a disabled API in one project only removes column-level lineage for the jobs that ran there. + ### Grant principal access to specific datasets: diff --git a/docs/snippets/dwh/bigquery/data_lineage_permissions.mdx b/docs/snippets/dwh/bigquery/data_lineage_permissions.mdx new file mode 100644 index 000000000..e7c8979f8 --- /dev/null +++ b/docs/snippets/dwh/bigquery/data_lineage_permissions.mdx @@ -0,0 +1,13 @@ +Elementary uses the [Data Lineage API](https://cloud.google.com/dataplex/docs/about-data-lineage) for column-level lineage built from your BigQuery jobs. Without it, Elementary still builds table-level lineage from `INFORMATION_SCHEMA.JOBS`. + +In **every project where your pipelines run queries**: + +1. Enable the Data Lineage API: open [the API page](https://console.cloud.google.com/apis/library/datalineage.googleapis.com) and click **"Enable"**, or run: + ```bash + gcloud services enable datalineage.googleapis.com --project=PROJECT_ID + ``` +2. In [IAM & Admin](https://console.cloud.google.com/iam-admin/iam), grant the same principal you granted the roles above the role **"Data Lineage Viewer"** (`roles/datalineage.viewer`) at the project level. + +Also enable the API in the project that owns Elementary's credentials (the service account's project, or the workload identity pool's project), if it is not one of those projects. + +BigQuery records lineage in the project where each job runs, so a missing role or a disabled API in one project only removes column-level lineage for the jobs that ran there. diff --git a/docs/snippets/dwh/bigquery/grant_user_access_on_dataset_level.mdx b/docs/snippets/dwh/bigquery/grant_user_access_on_dataset_level.mdx index 151027d08..f6f4b7ff4 100644 --- a/docs/snippets/dwh/bigquery/grant_user_access_on_dataset_level.mdx +++ b/docs/snippets/dwh/bigquery/grant_user_access_on_dataset_level.mdx @@ -1,3 +1,5 @@ +import DataLineagePermissions from '/snippets/dwh/bigquery/data_lineage_permissions.mdx'; + ### Grant service user access In order for a service user to work with Elementary Cloud, it requires the following permissions: @@ -29,17 +31,7 @@ These roles are required for Elementary to read query history (`INFORMATION_SCHE #### Optional: grant access to the Data Lineage API -Elementary uses the [Data Lineage API](https://cloud.google.com/dataplex/docs/about-data-lineage) for column-level lineage built from your BigQuery jobs. Without it, Elementary still builds table-level lineage from `INFORMATION_SCHEMA.JOBS`. - -In **every project where your pipelines run queries**: - -1. Enable the Data Lineage API: open [the API page](https://console.cloud.google.com/apis/library/datalineage.googleapis.com) and click **"Enable"**, or run: - ```bash - gcloud services enable datalineage.googleapis.com --project=PROJECT_ID - ``` -2. In [IAM & Admin](https://console.cloud.google.com/iam-admin/iam), grant the Elementary service account the role **"Data Lineage Viewer"** (`roles/datalineage.viewer`) at the project level. - -BigQuery records lineage in the project where each job runs, so a missing role or a disabled API in one project only removes column-level lineage for the jobs that ran there. + #### Step 2: Grant dataset-level role on the Elementary dataset From b6aaa521de178b7f7ef000dad3920ff16254fbca Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 29 Nov 2026 22:42:00 +0000 Subject: [PATCH 3/4] docs: number the credentials-project step Co-Authored-By: Itamar Hartstein --- docs/snippets/dwh/bigquery/data_lineage_permissions.mdx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/snippets/dwh/bigquery/data_lineage_permissions.mdx b/docs/snippets/dwh/bigquery/data_lineage_permissions.mdx index e7c8979f8..bfbaf703a 100644 --- a/docs/snippets/dwh/bigquery/data_lineage_permissions.mdx +++ b/docs/snippets/dwh/bigquery/data_lineage_permissions.mdx @@ -7,7 +7,6 @@ In **every project where your pipelines run queries**: gcloud services enable datalineage.googleapis.com --project=PROJECT_ID ``` 2. In [IAM & Admin](https://console.cloud.google.com/iam-admin/iam), grant the same principal you granted the roles above the role **"Data Lineage Viewer"** (`roles/datalineage.viewer`) at the project level. +3. If the project that owns Elementary's credentials (the service account's project, or the workload identity pool's project) is not one of those projects, enable the Data Lineage API there too, the same way as in step 1. -Also enable the API in the project that owns Elementary's credentials (the service account's project, or the workload identity pool's project), if it is not one of those projects. - -BigQuery records lineage in the project where each job runs, so a missing role or a disabled API in one project only removes column-level lineage for the jobs that ran there. +BigQuery records lineage in the project where each job runs, so a missing role or a disabled API in one of those projects only removes column-level lineage for the jobs that ran there. If the API is disabled in the credentials project, Elementary gets no column-level lineage at all. From 9de42beb96c704fb407282ee787931d6da8840cb Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 29 Nov 2026 23:05:14 +0000 Subject: [PATCH 4/4] docs: note that dbt column-level lineage doesn't need the Data Lineage API Co-Authored-By: Itamar Hartstein --- docs/snippets/dwh/bigquery/data_lineage_permissions.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/snippets/dwh/bigquery/data_lineage_permissions.mdx b/docs/snippets/dwh/bigquery/data_lineage_permissions.mdx index bfbaf703a..ea32c3926 100644 --- a/docs/snippets/dwh/bigquery/data_lineage_permissions.mdx +++ b/docs/snippets/dwh/bigquery/data_lineage_permissions.mdx @@ -1,4 +1,4 @@ -Elementary uses the [Data Lineage API](https://cloud.google.com/dataplex/docs/about-data-lineage) for column-level lineage built from your BigQuery jobs. Without it, Elementary still builds table-level lineage from `INFORMATION_SCHEMA.JOBS`. +Elementary uses the [Data Lineage API](https://cloud.google.com/dataplex/docs/about-data-lineage) for column-level lineage built from the jobs that run in BigQuery. Column-level lineage from your dbt project doesn't depend on this API. Without the API, Elementary still builds table-level lineage for BigQuery jobs from `INFORMATION_SCHEMA.JOBS`. In **every project where your pipelines run queries**: