The `google-cloud-datacatalog-lineage` client library allows Python developers to interact with the Google Cloud Datacatalog Lineage API. This API helps track the origin and transformation of data within Google Cloud, providing visibility into data pipelines. The current version is 0.6.0, and it follows Google Cloud's frequent release cadence for client libraries, often aligning with underlying API changes or bug fixes.
pip install google-cloud-datacatalog-lineageVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `LineageClient` and list data lineage processes within a specified Google Cloud project and location. It includes basic error handling and emphasizes proper project ID and authentication setup.
Always pin to a specific minor version (e.g., `google-cloud-datacatalog-lineage==0.6.*`) and test thoroughly before deploying new versions to production. Consult release notes for any breaking changes.
Ensure `GOOGLE_APPLICATION_CREDENTIALS` environment variable points to a valid service account key file, or run your application in a Google Cloud environment (e.g., GCE, Cloud Run, GKE) with appropriate permissions configured for the default service account.
To get all items at once, use `list(client.list_processes(...))` or iterate directly: `for item in client.list_processes(...): ...`.
Ensure your environment uses Python 3.9 or a newer supported version. Upgrade Python if necessary.
Change your import statement to `from google.cloud import datacatalog_lineage_v1`.
Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path of your service account key file, or ensure your application is running in a Google Cloud environment with default credentials configured.
Double-check the `project_id`, `location`, and any resource names. Verify that the service account or user has the necessary Data Catalog Lineage Viewer/Editor roles (`roles/datacatalog.viewer`, `roles/datacatalog.editor`) for the project.
No dependency data recorded yet.