Skip to content

Commit 7a4981a

Browse files
committed
refractor(snowflake): move snowflake-beta to certified snowflake source
1 parent b6d3fe8 commit 7a4981a

File tree

14 files changed

+46
-47
lines changed

14 files changed

+46
-47
lines changed

docs/cli.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ We use a plugin architecture so that you can install only the dependencies you a
9494
| [redshift](./generated/ingestion/sources/redshift.md) | `pip install 'acryl-datahub[redshift]'` | Redshift source |
9595
| [sagemaker](./generated/ingestion/sources/sagemaker.md) | `pip install 'acryl-datahub[sagemaker]'` | AWS SageMaker source |
9696
| [snowflake](./generated/ingestion/sources/snowflake.md) | `pip install 'acryl-datahub[snowflake]'` | Snowflake source |
97-
| [snowflake-usage](./generated/ingestion/sources/snowflake.md#module-snowflake-usage) | `pip install 'acryl-datahub[snowflake-usage]'` | Snowflake usage statistics source |
9897
| [sqlalchemy](./generated/ingestion/sources/sqlalchemy.md) | `pip install 'acryl-datahub[sqlalchemy]'` | Generic SQLAlchemy source |
9998
| [superset](./generated/ingestion/sources/superset.md) | `pip install 'acryl-datahub[superset]'` | Superset source |
10099
| [tableau](./generated/ingestion/sources/tableau.md) | `pip install 'acryl-datahub[tableau]'` | Tableau source |

docs/how/updating-datahub.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This file documents any backwards-incompatible changes in DataHub and assists pe
99
- Browse Paths have been upgraded to a new format to align more closely with the intention of the feature.
1010
Learn more about the changes, including steps on upgrading, here: https://datahubproject.io/docs/advanced/browse-paths-upgrade
1111
- The dbt ingestion source's `disable_dbt_node_creation` and `load_schema` options have been removed. They were no longer necessary due to the recently added sibling entities functionality.
12+
- The `snowflake` source now uses newer faster implementation (earlier `snowflake-beta`). Config properties `provision_role` and `check_role_grants` are not supported. Older `snowflake` and `snowflake-usage` are available as `snowflake-legacy` and `snowflake-usage-legacy` sources respectively.
1213

1314
### Potential Downtime
1415

metadata-ingestion/docs/dev_guides/stateful.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Note that a `.` is used to denote nested fields in the YAML recipe.
105105
#### Sample Configuration
106106
```yaml
107107
source:
108-
type: "snowflake-usage"
108+
type: "snowflake-usage-legacy"
109109
config:
110110
username: <user_name>
111111
password: <password>

metadata-ingestion/docs/sources/snowflake/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
Ingesting metadata from Snowflake requires either using the **snowflake-beta** module with just one recipe (recommended) or the two separate modules **snowflake** and **snowflake-usage** (soon to be deprecated) with two separate recipes.
1+
Ingesting metadata from Snowflake requires either using the **snowflake** module with just one recipe (recommended) or the two separate modules **snowflake-legacy** and **snowflake-usage-legacy** (soon to be deprecated) with two separate recipes.
22

33
All three modules are described on this page.
44

5-
We encourage you to try out the new **snowflake-beta** plugin as alternative to running both **snowflake** and **snowflake-usage** plugins and share feedback. `snowflake-beta` is much faster than `snowflake` for extracting metadata.
6-
75
## Snowflake Ingestion through the UI
86

97
The following video shows you how to ingest Snowflake metadata through the UI.
File renamed without changes.
Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
source:
2-
type: snowflake-beta
2+
type: snowflake-legacy
33
config:
4+
5+
check_role_grants: True
6+
provision_role: # Optional
7+
enabled: false
8+
dry_run: true
9+
run_ingestion: false
10+
admin_username: "${SNOWFLAKE_ADMIN_USER}"
11+
admin_password: "${SNOWFLAKE_ADMIN_PASS}"
12+
413
# This option is recommended to be used for the first time to ingest all lineage
514
ignore_start_time_lineage: true
615
# This is an alternative option to specify the start_time for lineage
716
# if you don't want to look back since beginning
8-
start_time: "2022-03-01T00:00:00Z"
17+
start_time: '2022-03-01T00:00:00Z'
918

1019
# Coordinates
1120
account_id: "abc48144"
@@ -16,12 +25,14 @@ source:
1625
password: "${SNOWFLAKE_PASS}"
1726
role: "datahub_role"
1827

19-
# Change these as per your database names. Remove to get all databases
28+
# Change these as per your database names. Remove to all all databases
2029
database_pattern:
2130
allow:
2231
- "^ACCOUNTING_DB$"
2332
- "^MARKETING_DB$"
24-
33+
schema_pattern:
34+
deny:
35+
- "information_schema.*"
2536
table_pattern:
2637
allow:
2738
# If you want to ingest only few tables with name revenue and sales
@@ -31,10 +42,12 @@ source:
3142
profiling:
3243
# Change to false to disable profiling
3344
enabled: true
34-
profile_table_level_only: true
3545
profile_pattern:
3646
allow:
37-
- "ACCOUNTING_DB.*.*"
38-
- "MARKETING_DB.*.*"
39-
# Default sink is datahub-rest and doesn't need to be configured
40-
# See https://datahubproject.io/docs/metadata-ingestion/sink_docs/datahub for customization options
47+
- 'ACCOUNTING_DB.*.*'
48+
- 'MARKETING_DB.*.*'
49+
deny:
50+
- '.*information_schema.*'
51+
52+
sink:
53+
# sink configs

metadata-ingestion/docs/sources/snowflake/snowflake-usage_pre.md renamed to metadata-ingestion/docs/sources/snowflake/snowflake-usage-legacy_pre.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Prerequisites
22

3-
In order to execute the `snowflake-usage` source, your Snowflake user will need to have specific privileges granted to it. Specifically, you'll need to grant access to the [Account Usage](https://docs.snowflake.com/en/sql-reference/account-usage.html) system tables, using which the DataHub source extracts information. Assuming you've followed the steps outlined in `snowflake` plugin to create a DataHub-specific User & Role, you'll simply need to execute the following commands in Snowflake. This will require a user with the `ACCOUNTADMIN` role (or a role granted the IMPORT SHARES global privilege). Please see [Snowflake docs for more details](https://docs.snowflake.com/en/user-guide/data-share-consumers.html).
3+
In order to execute the `snowflake-usage-legacy` source, your Snowflake user will need to have specific privileges granted to it. Specifically, you'll need to grant access to the [Account Usage](https://docs.snowflake.com/en/sql-reference/account-usage.html) system tables, using which the DataHub source extracts information. Assuming you've followed the steps outlined in `snowflake` plugin to create a DataHub-specific User & Role, you'll simply need to execute the following commands in Snowflake. This will require a user with the `ACCOUNTADMIN` role (or a role granted the IMPORT SHARES global privilege). Please see [Snowflake docs for more details](https://docs.snowflake.com/en/user-guide/data-share-consumers.html).
44

55
```sql
66
grant imported privileges on database snowflake to role datahub_role;
@@ -16,7 +16,7 @@ This plugin extracts the following:
1616

1717
:::note
1818

19-
This source only does usage statistics. To get the tables, views, and schemas in your Snowflake warehouse, ingest using the `snowflake` source described above.
19+
This source only does usage statistics. To get the tables, views, and schemas in your Snowflake warehouse, ingest using the `snowflake-legacy` source described above.
2020

2121
:::
2222

metadata-ingestion/docs/sources/snowflake/snowflake-usage_recipe.yml renamed to metadata-ingestion/docs/sources/snowflake/snowflake-usage-legacy_recipe.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
source:
2-
type: snowflake-usage
2+
type: snowflake-usage-legacy
33
config:
44
# Coordinates
55
account_id: account_name
File renamed without changes.
Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
source:
22
type: snowflake
33
config:
4-
5-
check_role_grants: True
6-
provision_role: # Optional
7-
enabled: false
8-
dry_run: true
9-
run_ingestion: false
10-
admin_username: "${SNOWFLAKE_ADMIN_USER}"
11-
admin_password: "${SNOWFLAKE_ADMIN_PASS}"
12-
134
# This option is recommended to be used for the first time to ingest all lineage
145
ignore_start_time_lineage: true
156
# This is an alternative option to specify the start_time for lineage
167
# if you don't want to look back since beginning
17-
start_time: '2022-03-01T00:00:00Z'
8+
start_time: "2022-03-01T00:00:00Z"
189

1910
# Coordinates
2011
account_id: "abc48144"
@@ -25,14 +16,12 @@ source:
2516
password: "${SNOWFLAKE_PASS}"
2617
role: "datahub_role"
2718

28-
# Change these as per your database names. Remove to all all databases
19+
# Change these as per your database names. Remove to get all databases
2920
database_pattern:
3021
allow:
3122
- "^ACCOUNTING_DB$"
3223
- "^MARKETING_DB$"
33-
schema_pattern:
34-
deny:
35-
- "information_schema.*"
24+
3625
table_pattern:
3726
allow:
3827
# If you want to ingest only few tables with name revenue and sales
@@ -42,12 +31,10 @@ source:
4231
profiling:
4332
# Change to false to disable profiling
4433
enabled: true
34+
turn_off_expensive_profiling_metrics: true
4535
profile_pattern:
4636
allow:
47-
- 'ACCOUNTING_DB.*.*'
48-
- 'MARKETING_DB.*.*'
49-
deny:
50-
- '.*information_schema.*'
51-
52-
sink:
53-
# sink configs
37+
- "ACCOUNTING_DB.*.*"
38+
- "MARKETING_DB.*.*"
39+
# Default sink is datahub-rest and doesn't need to be configured
40+
# See https://datahubproject.io/docs/metadata-ingestion/sink_docs/datahub for customization options

0 commit comments

Comments
 (0)