acryl-datahub 1.1.0.5rc11__py3-none-any.whl → 1.1.0.5rc12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of acryl-datahub might be problematic. Click here for more details.

@@ -1,7 +1,7 @@
1
- acryl_datahub-1.1.0.5rc11.dist-info/licenses/LICENSE,sha256=9xNHpsD0uYF5ONzXsKDCuHHB-xbiCrSbueWXqrTNsxk,11365
1
+ acryl_datahub-1.1.0.5rc12.dist-info/licenses/LICENSE,sha256=9xNHpsD0uYF5ONzXsKDCuHHB-xbiCrSbueWXqrTNsxk,11365
2
2
  datahub/__init__.py,sha256=aq_i5lVREmoLfYIqcx_pEQicO855YlhD19tWc1eZZNI,59
3
3
  datahub/__main__.py,sha256=pegIvQ9hzK7IhqVeUi1MeADSZ2QlP-D3K0OQdEg55RU,106
4
- datahub/_version.py,sha256=pW5LCAauFcN_5fwryjQJdB81K2HvRSufgySvocDiDdA,324
4
+ datahub/_version.py,sha256=jLxuBH6abML06qmsIEJ3LdiHoAGqbA2UaiXMKPLgzZ8,324
5
5
  datahub/entrypoints.py,sha256=9Qf-37rNnTzbGlx8S75OCDazIclFp6zWNcCEL1zCZto,9015
6
6
  datahub/errors.py,sha256=p5rFAdAGVCk4Lqolol1YvthceadUSwpaCxLXRcyCCFQ,676
7
7
  datahub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -84,7 +84,7 @@ datahub/cli/lite_cli.py,sha256=XKMejSuYUToKBvgN3YmmnxjRcaG5WPw23gJuQK8pgRc,13099
84
84
  datahub/cli/migrate.py,sha256=XWW_fd4EUQGAUrKh9oKmtNYmfhcvbqWZJj3TQNgD8Dk,18012
85
85
  datahub/cli/migration_utils.py,sha256=snkkT8ixo3Il4bvc7qN_QBOP1fz5UsO0usrUl2zJ68w,9478
86
86
  datahub/cli/put_cli.py,sha256=ehqsxEPVVK-0xu7nVfBl_GxfsDbkgjIjkF8mfGfcIpc,3827
87
- datahub/cli/quickstart_versioning.py,sha256=quLCjWBORu7LCkJ3_cquiSOguu0SRxl3R9hLqOekzYo,7433
87
+ datahub/cli/quickstart_versioning.py,sha256=Ec7SehEImRQW4I_8O89cTG1MvZtnnd8EJx9X8NaauoY,7302
88
88
  datahub/cli/state_cli.py,sha256=RDXYCb17sqjW49nNdkoGAqNPRRHOKw5lcgcs5QvHeOM,1142
89
89
  datahub/cli/telemetry.py,sha256=xw3SiAn2je48Qv4kXPYN5EPVKHWEWZc2LGoF7UzGs8U,489
90
90
  datahub/cli/timeline_cli.py,sha256=Wc_Mo7khFFHXgRSl2FgtvB8m0QhuCEhkpaFCIOPpHJE,7584
@@ -151,7 +151,7 @@ datahub/ingestion/api/registry.py,sha256=LbdZr89465Lj7ptQRVB4vI1JR1igWABvQFj9-WX
151
151
  datahub/ingestion/api/report.py,sha256=_bP7JPHZyftWnCJwFs6YId21mQ0-2rd406H91lLHW98,16942
152
152
  datahub/ingestion/api/report_helpers.py,sha256=WbUC1kQeaKqIagGV3XzfPmPs7slAT1mfNY4og2BH2A8,994
153
153
  datahub/ingestion/api/sink.py,sha256=GZt48PV56FAhNoma-V5EwwRZvezhb40YH_zprm8_Yo0,4961
154
- datahub/ingestion/api/source.py,sha256=WcpmuWRua87_UbaSY8GtkLkC0Gql0pM_i5FJN5ALh88,19669
154
+ datahub/ingestion/api/source.py,sha256=1vZu4oWLS1D8XMV55UjxOkOnMSQjnx0NMwVFFDS065Y,19694
155
155
  datahub/ingestion/api/source_helpers.py,sha256=XT9y5HgfVeF52jrX39vlLn1SdXpLVyT2Su8oGNsddYo,21148
156
156
  datahub/ingestion/api/transform.py,sha256=X0GpjMJzYkLuZx8MTWxH50cWGm9rGsnn3k188mmC8J8,582
157
157
  datahub/ingestion/api/workunit.py,sha256=e8n8RfSjHZZm2R4ShNH0UuMtUkMjyqqM2j2t7oL74lo,6327
@@ -300,7 +300,7 @@ datahub/ingestion/source/datahub/datahub_source.py,sha256=LsfDntDtqt_HMYCWwYctFK
300
300
  datahub/ingestion/source/datahub/report.py,sha256=VHBfCbwFRzdLdB7hQG9ST4EiZxl_vBCU0XxGcZR6Xxs,940
301
301
  datahub/ingestion/source/datahub/state.py,sha256=PZoT7sSK1wadVf5vN6phrgr7I6LL7ePP-EJjP1OO0bQ,3507
302
302
  datahub/ingestion/source/dbt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
303
- datahub/ingestion/source/dbt/dbt_cloud.py,sha256=435blM28-RIE7ZfQReh69zBXppv8tjbku10oFcyJY8Q,17891
303
+ datahub/ingestion/source/dbt/dbt_cloud.py,sha256=4gWOFSX0YU8EAJgO4J47NBE4QbNtJ-5nUe66vry-oGc,18160
304
304
  datahub/ingestion/source/dbt/dbt_common.py,sha256=5iqlHbH1eaRcysxvFmDfgNrfVpygnmmeHbLq_sLg2P4,82190
305
305
  datahub/ingestion/source/dbt/dbt_core.py,sha256=WVI2ZYXOMxgFzJnJqsqmEGS-5xdfiVIDsCb78lvSeQ0,24930
306
306
  datahub/ingestion/source/dbt/dbt_tests.py,sha256=pOZJaP4VsbaE5j4qVlE_E3ifno_KQpidfGTvOi5fr6I,9839
@@ -472,12 +472,12 @@ datahub/ingestion/source/snowflake/constants.py,sha256=XCW3vw4JfLn_s8-oXBX6WFNMP
472
472
  datahub/ingestion/source/snowflake/oauth_config.py,sha256=ol9D3RmruGStJAeL8PYSQguSqcD2HfkjPkMF2AB_eZs,1277
473
473
  datahub/ingestion/source/snowflake/oauth_generator.py,sha256=fu2VnREGuJXeTqIV2jx4TwieVnznf83HQkrE0h2DGGM,3423
474
474
  datahub/ingestion/source/snowflake/snowflake_assertion.py,sha256=_l3k4aI9wvioE81xxdeizJn9nJCZ_nMIXgk9N6pEk5o,4803
475
- datahub/ingestion/source/snowflake/snowflake_config.py,sha256=z8HLbYY9U0eEMvMbEv249-aVfsTpfli72XVbErW39Eo,21460
475
+ datahub/ingestion/source/snowflake/snowflake_config.py,sha256=KViQY8gYV_fVDx0hX1vJTtJ5qUc0x70mm3BH4xd8zKc,22292
476
476
  datahub/ingestion/source/snowflake/snowflake_connection.py,sha256=3-nP3HHCblUnUHYo_fvFp5VOAteCtR4GNjaUEvyNTNQ,18175
477
477
  datahub/ingestion/source/snowflake/snowflake_data_reader.py,sha256=ffR5E2uhD71FUMXd3XOg2rHwrp1rbbGEFTAbqKcmI2s,2195
478
478
  datahub/ingestion/source/snowflake/snowflake_lineage_v2.py,sha256=eWUlWMc5X2X_Y1I2peworFWLLsXQjryEHxPDuSqrowg,21683
479
479
  datahub/ingestion/source/snowflake/snowflake_profiler.py,sha256=PmQi-qDlRhdJ-PsJ7x-EScIiswWRAxDDOKHydvN3mTY,7404
480
- datahub/ingestion/source/snowflake/snowflake_queries.py,sha256=DWPs-ih4tNS7N5GftBkeh61zgL6UfKPXCY_RyspBaMA,41313
480
+ datahub/ingestion/source/snowflake/snowflake_queries.py,sha256=deJwFf9Bg3bphMi6WNfPon59hFSLYJZ4ByQA4pUkTkU,42926
481
481
  datahub/ingestion/source/snowflake/snowflake_query.py,sha256=kqOxibplHyDhdioue8MeXBzeDS9d274-dspb-wyWMMI,38165
482
482
  datahub/ingestion/source/snowflake/snowflake_report.py,sha256=O-465aBA8uaYZ6WepP7i6cgK6Q1jXJPjDA1j9C8klus,6762
483
483
  datahub/ingestion/source/snowflake/snowflake_schema.py,sha256=1yGBbs2aWIdHnrwgeTR7J2lqxbbBsIt8ejCLumIpLEA,27274
@@ -487,7 +487,7 @@ datahub/ingestion/source/snowflake/snowflake_summary.py,sha256=WJfsP8w3HceUkM6GK
487
487
  datahub/ingestion/source/snowflake/snowflake_tag.py,sha256=eA9xh-G1Ydr1OwUUtrbXUWp26hE1jF0zvyKNky_i_nQ,8887
488
488
  datahub/ingestion/source/snowflake/snowflake_usage_v2.py,sha256=mM0v9b4PHRJAT-SdRids3wdzc5O96gWCCww3e42itV8,24982
489
489
  datahub/ingestion/source/snowflake/snowflake_utils.py,sha256=w-SftpjHSOf_6S2T2srHJyJta3MHS0usmn4Z9jgx4QE,13858
490
- datahub/ingestion/source/snowflake/snowflake_v2.py,sha256=gaHFtgdJYqAyQzVSOJ7I7CaZ3xMqRnWLH2YaDxISrgw,35062
490
+ datahub/ingestion/source/snowflake/snowflake_v2.py,sha256=asZW8DztIB1TcGzOoZFmK6se22ZDaoG4L2NMvmd0yXY,35292
491
491
  datahub/ingestion/source/snowflake/stored_proc_lineage.py,sha256=rOb78iHiWiK8v8WdVs1xDwVut4Y0OHmszej6IopQfCo,5341
492
492
  datahub/ingestion/source/sql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
493
493
  datahub/ingestion/source/sql/athena.py,sha256=lQ_zniHtmtSFCnSmzM2dG7ND6zOZmhu6t-I4ZOeQKho,27652
@@ -619,7 +619,7 @@ datahub/lite/lite_server.py,sha256=p9Oa2nNs65mqcssSIVOr7VOzWqfVstz6ZQEdT4f82S0,1
619
619
  datahub/lite/lite_util.py,sha256=G0LQHKkyEb1pc_q183g6hflShclGx7kikgMaOxtVVcs,4545
620
620
  datahub/metadata/__init__.py,sha256=AjhXPjI6cnpdcrBRrE5gOWo15vv2TTl2ctU4UAnUN7A,238
621
621
  datahub/metadata/_internal_schema_classes.py,sha256=DaI4G-ykM_OVmFJHwHVTPZ6fMk4z40TJ8bSmj5n_UNw,1043557
622
- datahub/metadata/schema.avsc,sha256=GInldoYJf7brWjnjY2qWv68vgfE_mOXVMCTvLkUzzmk,733204
622
+ datahub/metadata/schema.avsc,sha256=e2ysaXgRqNjfLNyNqKPOcx-JB7fsoAnOdTr8_0hZwII,732872
623
623
  datahub/metadata/schema_classes.py,sha256=tPT8iHCak4IsZi_oL0nirbPpI8ETTPTZzapqLRpeKU4,1326
624
624
  datahub/metadata/urns.py,sha256=nfrCTExR-k2P9w272WVtWSN3xW1VUJngPwP3xnvULjU,1217
625
625
  datahub/metadata/_urns/__init__.py,sha256=cOF3GHMDgPhmbLKbN02NPpuLGHSu0qNgQyBRv08eqF0,243
@@ -896,7 +896,7 @@ datahub/metadata/schemas/PostKey.avsc,sha256=MEA-S-RonGrsrpwYEejR6CXRka2DcqP7S7q
896
896
  datahub/metadata/schemas/QuantitativeAnalyses.avsc,sha256=XrGYVoGUh7ZRjAbMORSiqF5Zl4a0IbYDPiQuSJhABZM,960
897
897
  datahub/metadata/schemas/QueryKey.avsc,sha256=VI4oIHvAO7f0lN_7V3QVuBfHcPz31c57XtW6IrlDfxc,518
898
898
  datahub/metadata/schemas/QueryProperties.avsc,sha256=26Q3zzuzJbUCUG7IJ3q_OEdcNbyzloZzDJWPbv3GQAk,5589
899
- datahub/metadata/schemas/QuerySubjects.avsc,sha256=WbnUGiOBdc1Ypn4P_R5gCfPH-wNHJUIk7YeyJ2NiOZQ,1747
899
+ datahub/metadata/schemas/QuerySubjects.avsc,sha256=PDM6Ek1AkjwLGDk17Rjg7KVtE2tbgFpc1XTGkhoG4MA,1437
900
900
  datahub/metadata/schemas/QueryUsageStatistics.avsc,sha256=z1gfAnXdBoPEeERi5RESjrdBuS6AcIdqdN5JqWOSuNo,6192
901
901
  datahub/metadata/schemas/RoleKey.avsc,sha256=Uas5jFViSHXhFqq8D4P6-UXqywOth3coztjQ5wA7wL0,449
902
902
  datahub/metadata/schemas/RoleMembership.avsc,sha256=Al3LXKRowCiHhgTfwr3a-piID3Ld5kN-6-e9edTZ0uU,570
@@ -1091,8 +1091,8 @@ datahub_provider/operators/datahub_assertion_operator.py,sha256=uvTQ-jk2F0sbqqxp
1091
1091
  datahub_provider/operators/datahub_assertion_sensor.py,sha256=lCBj_3x1cf5GMNpHdfkpHuyHfVxsm6ff5x2Z5iizcAo,140
1092
1092
  datahub_provider/operators/datahub_operation_operator.py,sha256=aevDp2FzX7FxGlXrR0khoHNbxbhKR2qPEX5e8O2Jyzw,174
1093
1093
  datahub_provider/operators/datahub_operation_sensor.py,sha256=8fcdVBCEPgqy1etTXgLoiHoJrRt_nzFZQMdSzHqSG7M,168
1094
- acryl_datahub-1.1.0.5rc11.dist-info/METADATA,sha256=foPeHlIiZp3IZgq2Objhuchv_WwA6lfnBq7_Xnuzcgo,181840
1095
- acryl_datahub-1.1.0.5rc11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1096
- acryl_datahub-1.1.0.5rc11.dist-info/entry_points.txt,sha256=bnGf6eX9UhiW8yVHtt6MJCVcmLErvrVQxTJAayA-PKc,9885
1097
- acryl_datahub-1.1.0.5rc11.dist-info/top_level.txt,sha256=iLjSrLK5ox1YVYcglRUkcvfZPvKlobBWx7CTUXx8_GI,25
1098
- acryl_datahub-1.1.0.5rc11.dist-info/RECORD,,
1094
+ acryl_datahub-1.1.0.5rc12.dist-info/METADATA,sha256=LMf3IPRnfSYjPD5VZLcn7c-40swXd6Qc7PB_NabrgAE,181896
1095
+ acryl_datahub-1.1.0.5rc12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1096
+ acryl_datahub-1.1.0.5rc12.dist-info/entry_points.txt,sha256=bnGf6eX9UhiW8yVHtt6MJCVcmLErvrVQxTJAayA-PKc,9885
1097
+ acryl_datahub-1.1.0.5rc12.dist-info/top_level.txt,sha256=iLjSrLK5ox1YVYcglRUkcvfZPvKlobBWx7CTUXx8_GI,25
1098
+ acryl_datahub-1.1.0.5rc12.dist-info/RECORD,,
datahub/_version.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # Published at https://pypi.org/project/acryl-datahub/.
2
2
  __package_name__ = "acryl-datahub"
3
- __version__ = "1.1.0.5rc11"
3
+ __version__ = "1.1.0.5rc12"
4
4
 
5
5
 
6
6
  def is_dev_mode() -> bool:
@@ -162,12 +162,10 @@ class QuickstartVersionMappingConfig(BaseModel):
162
162
  # docker compose based resolved compose file. In those cases, we pick up the composefile from
163
163
  # MINIMUM_SUPPORTED_VERSION which contains the compose file.
164
164
  if _is_it_a_version(result.composefile_git_ref):
165
- if (
166
- parse("v1.2.0") > parse(result.composefile_git_ref)
167
- ): # TODO: Once we decide what the new version that supports profile based compose.
168
- # The merge commit where the labels were added
169
- # https://github.com/datahub-project/datahub/pull/7473
170
- result.composefile_git_ref = "1d3339276129a7cb8385c07a958fcc93acda3b4e" # TODO update after compose file is merged
165
+ if parse("v1.2.0") > parse(result.composefile_git_ref):
166
+ # The merge commit where profiles based resolved compose file was added.
167
+ # https://github.com/datahub-project/datahub/pull/13566
168
+ result.composefile_git_ref = "21726bc3341490f4182b904626c793091ac95edd"
171
169
 
172
170
  return result
173
171
 
@@ -230,9 +230,10 @@ class SourceReport(ExamplesReport):
230
230
  context: Optional[str] = None,
231
231
  title: Optional[LiteralString] = None,
232
232
  exc: Optional[BaseException] = None,
233
+ log: bool = True,
233
234
  ) -> None:
234
235
  self._structured_logs.report_log(
235
- StructuredLogLevel.WARN, message, title, context, exc, log=True
236
+ StructuredLogLevel.WARN, message, title, context, exc, log=log
236
237
  )
237
238
 
238
239
  def report_failure(
@@ -26,6 +26,7 @@ from datahub.ingestion.source.dbt.dbt_common import (
26
26
  DBTCommonConfig,
27
27
  DBTNode,
28
28
  DBTSourceBase,
29
+ DBTSourceReport,
29
30
  )
30
31
  from datahub.ingestion.source.dbt.dbt_tests import DBTTest, DBTTestResult
31
32
 
@@ -266,6 +267,7 @@ query DatahubMetadataQuery_{type}($jobId: BigInt!, $runId: BigInt) {{
266
267
  @capability(SourceCapability.TEST_CONNECTION, "Enabled by default")
267
268
  class DBTCloudSource(DBTSourceBase, TestableSource):
268
269
  config: DBTCloudConfig
270
+ report: DBTSourceReport # nothing cloud-specific in the report
269
271
 
270
272
  @classmethod
271
273
  def create(cls, config_dict, ctx):
@@ -404,8 +406,11 @@ class DBTCloudSource(DBTSourceBase, TestableSource):
404
406
  if node["resourceType"] in {"model", "seed", "snapshot"}:
405
407
  status = node["status"]
406
408
  if status is None and materialization != "ephemeral":
407
- self.report.report_warning(
408
- key, "node is missing a status, schema metadata will be incomplete"
409
+ self.report.warning(
410
+ title="Schema information may be incomplete",
411
+ message="Some nodes are missing the `status` field, which dbt uses to track the status of the node in the target database.",
412
+ context=key,
413
+ log=False,
409
414
  )
410
415
 
411
416
  # The code fields are new in dbt 1.3, and replace the sql ones.
@@ -361,6 +361,20 @@ class SnowflakeV2Config(
361
361
  "Only applicable if `use_queries_v2` is enabled.",
362
362
  )
363
363
 
364
+ push_down_database_pattern_access_history: bool = Field(
365
+ default=False,
366
+ description="If enabled, pushes down database pattern filtering to the access_history table for improved performance. "
367
+ "This filters on the accessed objects in access_history.",
368
+ )
369
+
370
+ additional_database_names_allowlist: List[str] = Field(
371
+ default=[],
372
+ description="Additional database names (no pattern matching) to be included in the access_history filter. "
373
+ "Only applies if push_down_database_pattern_access_history=True. "
374
+ "These databases will be included in the filter being pushed down regardless of database_pattern settings."
375
+ "This may be required in the case of _eg_ temporary tables being created in a different database than the ones in the database_name patterns.",
376
+ )
377
+
364
378
  @validator("convert_urns_to_lowercase")
365
379
  def validate_convert_urns_to_lowercase(cls, v):
366
380
  if not v:
@@ -787,6 +787,11 @@ class QueryLogQueryBuilder:
787
787
  would be incorrectly filtered out because they don't populate the DML arrays, causing missing lineage
788
788
  and operational metadata.
789
789
 
790
+ Filtering Logic:
791
+ A query is included if it matches:
792
+ - Any database name in additional_database_names (exact match), OR
793
+ - Any database pattern in database_pattern.allow AND NOT any pattern in database_pattern.deny
794
+
790
795
  Args:
791
796
  database_pattern: The AllowDenyPattern configuration for database filtering
792
797
  additional_database_names: Additional database names to always include (no pattern matching)
@@ -797,14 +802,31 @@ class QueryLogQueryBuilder:
797
802
  if not database_pattern and not additional_database_names:
798
803
  return "TRUE"
799
804
 
800
- # Build the database filter conditions for pattern matching
805
+ # Build the database filter conditions
806
+ # Logic: Allow if (matches additional_database_names_allowlist) OR (matches database_pattern.allow AND NOT matches database_pattern.deny)
801
807
  # Note: Using UPPER() + RLIKE for case-insensitive matching is more performant than REGEXP_LIKE with 'i' flag
802
- database_filter_parts = []
803
808
 
809
+ # Build additional database names condition (exact matches) - these always get included
810
+ additional_db_condition = None
811
+ if additional_database_names:
812
+ additional_db_conditions = []
813
+ for db_name in additional_database_names:
814
+ # Escape single quotes
815
+ escaped_db_name = db_name.replace("'", "''")
816
+ additional_db_conditions.append(
817
+ f"SPLIT_PART(UPPER(o:objectName), '.', 1) = '{escaped_db_name.upper()}'"
818
+ )
819
+ if additional_db_conditions:
820
+ additional_db_condition = " OR ".join(additional_db_conditions)
821
+
822
+ # Build database pattern condition (allow AND NOT deny)
823
+ database_pattern_condition = None
804
824
  if database_pattern:
805
825
  allow_patterns = database_pattern.allow
806
826
  deny_patterns = database_pattern.deny
807
827
 
828
+ pattern_parts = []
829
+
808
830
  # Add allow patterns (if not the default "allow all")
809
831
  if allow_patterns and allow_patterns != [".*"]:
810
832
  allow_conditions = []
@@ -815,7 +837,11 @@ class QueryLogQueryBuilder:
815
837
  f"SPLIT_PART(UPPER(o:objectName), '.', 1) RLIKE '{escaped_pattern}'"
816
838
  )
817
839
  if allow_conditions:
818
- database_filter_parts.append(f"({' OR '.join(allow_conditions)})")
840
+ pattern_parts.append(
841
+ allow_conditions[0]
842
+ if len(allow_conditions) == 1
843
+ else f"({' OR '.join(allow_conditions)})"
844
+ )
819
845
 
820
846
  # Add deny patterns
821
847
  if deny_patterns:
@@ -827,24 +853,36 @@ class QueryLogQueryBuilder:
827
853
  f"SPLIT_PART(UPPER(o:objectName), '.', 1) NOT RLIKE '{escaped_pattern}'"
828
854
  )
829
855
  if deny_conditions:
830
- database_filter_parts.append(f"({' AND '.join(deny_conditions)})")
856
+ pattern_parts.append(
857
+ deny_conditions[0]
858
+ if len(deny_conditions) == 1
859
+ else f"({' AND '.join(deny_conditions)})"
860
+ )
831
861
 
832
- # Add additional database names (exact matches)
833
- if additional_database_names:
834
- additional_db_conditions = []
835
- for db_name in additional_database_names:
836
- # Escape single quotes
837
- escaped_db_name = db_name.replace("'", "''")
838
- additional_db_conditions.append(
839
- f"SPLIT_PART(UPPER(o:objectName), '.', 1) = '{escaped_db_name.upper()}'"
840
- )
841
- if additional_db_conditions:
842
- database_filter_parts.append(
843
- f"({' OR '.join(additional_db_conditions)})"
844
- )
862
+ if pattern_parts:
863
+ database_pattern_condition = " AND ".join(pattern_parts)
845
864
 
846
- if database_filter_parts:
847
- database_filter_condition = " AND ".join(database_filter_parts)
865
+ # Combine conditions: additional_database_names OR database_pattern
866
+ filter_conditions = []
867
+ if additional_db_condition:
868
+ filter_conditions.append(
869
+ f"({additional_db_condition})"
870
+ if len(additional_db_condition.split(" OR ")) > 1
871
+ else additional_db_condition
872
+ )
873
+ if database_pattern_condition:
874
+ filter_conditions.append(
875
+ f"({database_pattern_condition})"
876
+ if len(database_pattern_condition.split(" AND ")) > 1
877
+ else database_pattern_condition
878
+ )
879
+
880
+ if filter_conditions:
881
+ database_filter_condition = (
882
+ filter_conditions[0]
883
+ if len(filter_conditions) == 1
884
+ else " OR ".join(filter_conditions)
885
+ )
848
886
 
849
887
  # Build a condition that checks if any objects in the arrays match the database pattern
850
888
  # This implements "at least one" matching behavior: queries are allowed if they touch
@@ -601,6 +601,8 @@ class SnowflakeV2Source(
601
601
  user_email_pattern=self.config.user_email_pattern,
602
602
  pushdown_deny_usernames=self.config.pushdown_deny_usernames,
603
603
  query_dedup_strategy=self.config.query_dedup_strategy,
604
+ push_down_database_pattern_access_history=self.config.push_down_database_pattern_access_history,
605
+ additional_database_names_allowlist=self.config.additional_database_names_allowlist,
604
606
  ),
605
607
  structured_report=self.report,
606
608
  filters=self.filters,
@@ -10853,13 +10853,6 @@
10853
10853
  "namespace": "com.linkedin.pegasus2avro.query",
10854
10854
  "fields": [
10855
10855
  {
10856
- "Relationship": {
10857
- "entityTypes": [
10858
- "dataset",
10859
- "schemaField"
10860
- ],
10861
- "name": "IsAssociatedWith"
10862
- },
10863
10856
  "Searchable": {
10864
10857
  "fieldName": "entities",
10865
10858
  "fieldType": "URN"
@@ -10868,10 +10861,6 @@
10868
10861
  "class": "com.linkedin.pegasus2avro.common.urn.Urn"
10869
10862
  },
10870
10863
  "Urn": "Urn",
10871
- "entityTypes": [
10872
- "dataset",
10873
- "schemaField"
10874
- ],
10875
10864
  "type": "string",
10876
10865
  "name": "entity",
10877
10866
  "doc": "An entity which is the subject of a query."
@@ -15,13 +15,6 @@
15
15
  "namespace": "com.linkedin.pegasus2avro.query",
16
16
  "fields": [
17
17
  {
18
- "Relationship": {
19
- "entityTypes": [
20
- "dataset",
21
- "schemaField"
22
- ],
23
- "name": "IsAssociatedWith"
24
- },
25
18
  "Searchable": {
26
19
  "fieldName": "entities",
27
20
  "fieldType": "URN"
@@ -32,11 +25,7 @@
32
25
  "type": "string",
33
26
  "name": "entity",
34
27
  "doc": "An entity which is the subject of a query.",
35
- "Urn": "Urn",
36
- "entityTypes": [
37
- "dataset",
38
- "schemaField"
39
- ]
28
+ "Urn": "Urn"
40
29
  }
41
30
  ],
42
31
  "doc": "A single subject of a particular query.\nIn the future, we may evolve this model to include richer details\nabout the Query Subject in relation to the query."