Skip to content

Commit f80cb19

Browse files
anshbansalyoonhyejin
authored andcommitted
feat(ingest/snowflake): breaking change for match_fully_qualified_names (#13852)
1 parent 93ff8f5 commit f80cb19

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

docs/how/updating-datahub.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ This file documents any backwards-incompatible changes in DataHub and assists pe
3030

3131
### Breaking Changes
3232

33+
- #13852 `snowflake` connector has `match_fully_qualified_names` which has been present for backward compatibility. If you are using `schema_pattern` but have not set `match_fully_qualified_names: true` please change it to `match_fully_qualified_names: true` and update your `schema_pattern` to match against fully qualified schema names `<catalog_name>.<schema_name>`. We were printing warnings earlier for this. We are making this backward incompatible breaking change to make this consistent with all other sources.
34+
3335
### Known Issues
3436

3537
### Potential Downtime

metadata-ingestion/docs/sources/snowflake/snowflake_recipe.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ source:
44
# This option is recommended to be used to ingest all lineage on the first run.
55
ignore_start_time_lineage: true
66

7+
# This has the default of `false` for backward compatibility but we are making a breaking change so add it here
8+
# in case you wish to use schema_pattern
9+
match_fully_qualified_names: true
10+
11+
# This flag tells the snowflake ingestion to use the more advanced query parsing. This will become the default eventually.
12+
use_queries_v2: true
13+
714
# Coordinates
815
account_id: "abc48144"
916
warehouse: "COMPUTE_WH"

metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_config.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,12 @@ def validate_legacy_schema_pattern(cls, values: Dict) -> Dict:
135135
and match_fully_qualified_names is not None
136136
and not match_fully_qualified_names
137137
):
138-
logger.warning(
139-
"Please update `schema_pattern` to match against fully qualified schema name `<catalog_name>.<schema_name>` and set config `match_fully_qualified_names : True`."
140-
"Current default `match_fully_qualified_names: False` is only to maintain backward compatibility. "
141-
"The config option `match_fully_qualified_names` will be deprecated in future and the default behavior will assume `match_fully_qualified_names: True`."
138+
raise ValueError(
139+
"`match_fully_qualified_names: False` is no longer supported. "
140+
"Please set `match_fully_qualified_names: True` and update your `schema_pattern` "
141+
"to match against fully qualified schema names `<catalog_name>.<schema_name>`. "
142+
"The config option `match_fully_qualified_names` will be removed in future and the default behavior will assume `match_fully_qualified_names: True`."
143+
"match_fully_qualified_names False was there to maintain backward compatibility."
142144
)
143145

144146
# Always exclude reporting metadata for INFORMATION_SCHEMA schema

metadata-ingestion/tests/integration/snowflake/test_snowflake.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ def test_snowflake_private_link_and_incremental_mcps(
284284
account_id="ABC12345.ap-south-1.privatelink",
285285
username="TST_USR",
286286
password="TST_PWD",
287-
schema_pattern=AllowDenyPattern(allow=["test_schema"]),
287+
schema_pattern=AllowDenyPattern(allow=["test_db.test_schema"]),
288+
match_fully_qualified_names=True,
288289
include_technical_schema=True,
289290
include_table_lineage=True,
290291
include_column_lineage=False,

0 commit comments

Comments
 (0)