Skip to content

Commit ff385ed

Browse files
authored
build(ingest/sqlglot): Bump pin to support snowflake CREATE ... WITH TAG (#12003)
1 parent d2359e2 commit ff385ed

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

metadata-ingestion/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
# We heavily monkeypatch sqlglot.
102102
# Prior to the patching, we originally maintained an acryl-sqlglot fork:
103103
# https://github.com/tobymao/sqlglot/compare/main...hsheth2:sqlglot:main?expand=1
104-
"sqlglot[rs]==25.26.0",
104+
"sqlglot[rs]==25.32.1",
105105
"patchy==2.8.0",
106106
}
107107

metadata-ingestion/src/datahub/testing/compare_metadata_json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def diff_metadata_json(
117117
ignore_paths: Sequence[str] = (),
118118
ignore_order: bool = True,
119119
) -> Union[DeepDiff, MCPDiff]:
120-
ignore_paths = (*ignore_paths, *default_exclude_paths, r"root\[\d+].delta_info")
120+
ignore_paths = [*ignore_paths, *default_exclude_paths, r"root\[\d+].delta_info"]
121121
try:
122122
if ignore_order:
123123
golden_map = get_aspects_by_urn(golden)

metadata-ingestion/tests/unit/sql_parsing/aggregator_goldens/test_table_rename.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
"aspect": {
186186
"json": {
187187
"statement": {
188-
"value": "ALTER TABLE dev.public.foo_staging RENAME TO foo",
188+
"value": "ALTER TABLE dev.public.foo_staging RENAME TO foo /* Datahub generated query text-- */",
189189
"language": "SQL"
190190
},
191191
"source": "SYSTEM",

metadata-ingestion/tests/unit/sql_parsing/aggregator_goldens/test_table_swap.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
"aspect": {
186186
"json": {
187187
"statement": {
188-
"value": "ALTER TABLE dev.public.person_info_swap SWAP WITH dev.public.person_info",
188+
"value": "ALTER TABLE dev.public.person_info_swap SWAP WITH dev.public.person_info /* Datahub generated query text-- */",
189189
"language": "SQL"
190190
},
191191
"source": "SYSTEM",
@@ -438,7 +438,7 @@
438438
"aspect": {
439439
"json": {
440440
"statement": {
441-
"value": "ALTER TABLE dev.public.person_info SWAP WITH dev.public.person_info_swap",
441+
"value": "ALTER TABLE dev.public.person_info SWAP WITH dev.public.person_info_swap /* Datahub generated query text-- */",
442442
"language": "SQL"
443443
},
444444
"source": "SYSTEM",

metadata-ingestion/tests/unit/sql_parsing/aggregator_goldens/test_table_swap_with_temp.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
"aspect": {
176176
"json": {
177177
"statement": {
178-
"value": "CREATE TABLE person_info_swap CLONE person_info;\n\nCREATE TABLE person_info_incremental AS\nSELECT\n *\nFROM person_info_dep;\n\nINSERT INTO person_info_swap\nSELECT\n *\nFROM person_info_incremental;\n\nALTER TABLE dev.public.person_info_swap SWAP WITH dev.public.person_info",
178+
"value": "CREATE TABLE person_info_swap CLONE person_info;\n\nCREATE TABLE person_info_incremental AS\nSELECT\n *\nFROM person_info_dep;\n\nINSERT INTO person_info_swap\nSELECT\n *\nFROM person_info_incremental;\n\nALTER TABLE dev.public.person_info_swap SWAP WITH dev.public.person_info /* Datahub generated query text-- */",
179179
"language": "SQL"
180180
},
181181
"source": "SYSTEM",

metadata-ingestion/tests/unit/sql_parsing/goldens/test_bigquery_information_schema_query.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"query_type": "SELECT",
33
"query_type_props": {},
4-
"query_fingerprint": "c721ce16410601b36e5f32bd9c5c28488500a93e617363739faebfe71496f163",
4+
"query_fingerprint": "a204522c98a01568d8575a98a715de98985aeef0e822feb8450153f71891d6c6",
55
"in_tables": [
66
"urn:li:dataset:(urn:li:dataPlatform:bigquery,acryl-staging-2.smoke_test_db_4.INFORMATION_SCHEMA.COLUMNS,PROD)",
77
"urn:li:dataset:(urn:li:dataPlatform:bigquery,acryl-staging-2.smoke_test_db_4.INFORMATION_SCHEMA.COLUMN_FIELD_PATHS,PROD)"
@@ -178,6 +178,6 @@
178178
],
179179
"debug_info": {
180180
"confidence": 0.2,
181-
"generalized_statement": "SELECT c.table_catalog AS table_catalog, c.table_schema AS table_schema, c.table_name AS table_name, c.column_name AS column_name, c.ordinal_position AS ordinal_position, cfp.field_path AS field_path, c.is_nullable AS is_nullable, CASE WHEN CONTAINS_SUBSTR(cfp.field_path, ?) THEN NULL ELSE c.data_type END AS data_type, description AS comment, c.is_hidden AS is_hidden, c.is_partitioning_column AS is_partitioning_column, c.clustering_ordinal_position AS clustering_ordinal_position FROM `acryl-staging-2`.`smoke_test_db_4`.INFORMATION_SCHEMA.COLUMNS AS c JOIN `acryl-staging-2`.`smoke_test_db_4`.INFORMATION_SCHEMA.COLUMN_FIELD_PATHS AS cfp ON cfp.table_name = c.table_name AND cfp.column_name = c.column_name ORDER BY table_catalog, table_schema, table_name, ordinal_position ASC, data_type DESC"
181+
"generalized_statement": "SELECT c.table_catalog AS table_catalog, c.table_schema AS table_schema, c.table_name AS table_name, c.column_name AS column_name, c.ordinal_position AS ordinal_position, cfp.field_path AS field_path, c.is_nullable AS is_nullable, CASE WHEN CONTAINS_SUBSTR(cfp.field_path, ?) THEN NULL ELSE c.data_type END AS data_type, description AS comment, c.is_hidden AS is_hidden, c.is_partitioning_column AS is_partitioning_column, c.clustering_ordinal_position AS clustering_ordinal_position FROM `acryl-staging-2`.`smoke_test_db_4`.`INFORMATION_SCHEMA.COLUMNS` AS c JOIN `acryl-staging-2`.`smoke_test_db_4`.`INFORMATION_SCHEMA.COLUMN_FIELD_PATHS` AS cfp ON cfp.table_name = c.table_name AND cfp.column_name = c.column_name ORDER BY table_catalog, table_schema, table_name, ordinal_position ASC, data_type DESC"
182182
}
183183
}

0 commit comments

Comments
 (0)