From b4c0e20c680bd97c4228ad130d84bf3e24183e5b Mon Sep 17 00:00:00 2001 From: Ravindra Lanka Date: Tue, 5 Oct 2021 22:58:07 -0700 Subject: [PATCH] feat(ingest): add lineage support to snowflake connector (#3331) --- metadata-ingestion/source_docs/snowflake.md | 54 +++--- .../configuration/time_window_config.py | 64 ++++++ .../datahub/ingestion/source/sql/snowflake.py | 182 +++++++++++++++++- .../ingestion/source/usage/bigquery_usage.py | 2 +- .../ingestion/source/usage/redshift_usage.py | 2 +- .../ingestion/source/usage/snowflake_usage.py | 2 +- .../ingestion/source/usage/usage_common.py | 62 +----- 7 files changed, 277 insertions(+), 91 deletions(-) create mode 100644 metadata-ingestion/src/datahub/configuration/time_window_config.py diff --git a/metadata-ingestion/source_docs/snowflake.md b/metadata-ingestion/source_docs/snowflake.md index 3b122d375c..457c3d5815 100644 --- a/metadata-ingestion/source_docs/snowflake.md +++ b/metadata-ingestion/source_docs/snowflake.md @@ -13,6 +13,7 @@ This plugin extracts the following: - Metadata for databases, schemas, views and tables - Column types associated with each table - Table, row, and column statistics via optional [SQL profiling](./sql_profiles.md) +- Table lineage. :::tip @@ -37,7 +38,7 @@ source: # Credentials username: user password: pass - role: "sysadmin" + role: "accountadmin" sink: # sink configs @@ -49,29 +50,34 @@ Note that a `.` is used to denote nested fields in the YAML recipe. As a SQL-based service, the Athena integration is also supported by our SQL profiler. See [here](./sql_profiles.md) for more details on configuration. -| Field | Required | Default | Description | -| ----------------------------- | -------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `username` | | | Snowflake username. | -| `password` | | | Snowflake password. | -| `host_port` | ✅ | | Snowflake host URL. | -| `warehouse` | | | Snowflake warehouse. | -| `role` | | | Snowflake role. | -| `env` | | `"PROD"` | Environment to use in namespace when constructing URNs. | -| `options.