Repository navigation
docs: BigQuery Data Lineage API permission for column-level lineage #2425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
eb219d5
docs: BigQuery Data Lineage API permission for column-level lineage
devin-ai-integration[bot] e855b21
docs: share the Data Lineage API steps and note the credentials project
devin-ai-integration[bot] b6aaa52
docs: number the credentials-project step
devin-ai-integration[bot] 9de42be
docs: note that dbt column-level lineage doesn't need the Data Lineag…
devin-ai-integration[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| 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**: | ||
|
|
||
| 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. | ||
| 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. | ||
|
|
||
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 No warning about lineage charges
Enabling the Data Lineage API starts billable processing and metadata storage for supported services with ingestion enabled. The writing guide calls for a warning before actions with side effects.
Devin left this for you to triage: I haven't verified Google's current billing for lineage ingestion after the API is enabled. If it is billed, add a Note linking Dataplex pricing before the enable step.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.