acryl-datahub 1.2.0.3rc1__py3-none-any.whl → 1.2.0.4__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.

Files changed (74) hide show
  1. {acryl_datahub-1.2.0.3rc1.dist-info → acryl_datahub-1.2.0.4.dist-info}/METADATA +2609 -2608
  2. {acryl_datahub-1.2.0.3rc1.dist-info → acryl_datahub-1.2.0.4.dist-info}/RECORD +74 -73
  3. datahub/_version.py +1 -1
  4. datahub/api/entities/dataset/dataset.py +3 -3
  5. datahub/api/entities/external/external_tag.py +6 -4
  6. datahub/api/entities/external/lake_formation_external_entites.py +50 -49
  7. datahub/api/entities/external/restricted_text.py +105 -180
  8. datahub/api/entities/external/unity_catalog_external_entites.py +51 -52
  9. datahub/api/entities/forms/forms.py +3 -3
  10. datahub/api/entities/structuredproperties/structuredproperties.py +2 -2
  11. datahub/cli/quickstart_versioning.py +1 -1
  12. datahub/cli/specific/assertions_cli.py +37 -2
  13. datahub/cli/specific/datacontract_cli.py +54 -4
  14. datahub/emitter/rest_emitter.py +18 -5
  15. datahub/ingestion/api/auto_work_units/auto_ensure_aspect_size.py +1 -1
  16. datahub/ingestion/api/report.py +21 -2
  17. datahub/ingestion/api/source.py +81 -7
  18. datahub/ingestion/autogenerated/capability_summary.json +47 -19
  19. datahub/ingestion/graph/client.py +19 -3
  20. datahub/ingestion/sink/datahub_rest.py +2 -0
  21. datahub/ingestion/source/abs/config.py +1 -1
  22. datahub/ingestion/source/abs/datalake_profiler_config.py +1 -1
  23. datahub/ingestion/source/abs/source.py +9 -0
  24. datahub/ingestion/source/aws/glue.py +18 -2
  25. datahub/ingestion/source/aws/tag_entities.py +4 -4
  26. datahub/ingestion/source/data_lake_common/path_spec.py +6 -3
  27. datahub/ingestion/source/datahub/datahub_source.py +8 -1
  28. datahub/ingestion/source/dbt/dbt_cloud.py +6 -3
  29. datahub/ingestion/source/dbt/dbt_common.py +10 -0
  30. datahub/ingestion/source/delta_lake/source.py +8 -1
  31. datahub/ingestion/source/dremio/dremio_source.py +19 -2
  32. datahub/ingestion/source/fivetran/fivetran.py +9 -3
  33. datahub/ingestion/source/fivetran/fivetran_log_api.py +4 -3
  34. datahub/ingestion/source/ge_data_profiler.py +8 -0
  35. datahub/ingestion/source/grafana/models.py +6 -0
  36. datahub/ingestion/source/hex/hex.py +1 -1
  37. datahub/ingestion/source/hex/query_fetcher.py +1 -1
  38. datahub/ingestion/source/iceberg/iceberg.py +4 -4
  39. datahub/ingestion/source/looker/looker_liquid_tag.py +56 -5
  40. datahub/ingestion/source/mock_data/datahub_mock_data.py +26 -10
  41. datahub/ingestion/source/powerbi/powerbi.py +4 -1
  42. datahub/ingestion/source/powerbi_report_server/report_server_domain.py +2 -4
  43. datahub/ingestion/source/redshift/datashares.py +1 -1
  44. datahub/ingestion/source/redshift/redshift.py +1 -0
  45. datahub/ingestion/source/salesforce.py +8 -0
  46. datahub/ingestion/source/slack/slack.py +7 -14
  47. datahub/ingestion/source/snowflake/snowflake_lineage_v2.py +4 -4
  48. datahub/ingestion/source/sql/athena_properties_extractor.py +2 -2
  49. datahub/ingestion/source/sql/hive_metastore.py +8 -0
  50. datahub/ingestion/source/sql/teradata.py +8 -1
  51. datahub/ingestion/source/sql/trino.py +9 -0
  52. datahub/ingestion/source/tableau/tableau.py +1 -1
  53. datahub/ingestion/source/unity/config.py +36 -1
  54. datahub/ingestion/source/unity/proxy.py +332 -46
  55. datahub/ingestion/source/unity/proxy_types.py +12 -2
  56. datahub/ingestion/source/unity/source.py +91 -34
  57. datahub/ingestion/source/unity/tag_entities.py +5 -5
  58. datahub/ingestion/source/usage/starburst_trino_usage.py +2 -2
  59. datahub/ingestion/transformer/base_transformer.py +8 -5
  60. datahub/metadata/_internal_schema_classes.py +513 -513
  61. datahub/metadata/_urns/urn_defs.py +1684 -1684
  62. datahub/metadata/schema.avsc +16745 -16348
  63. datahub/metadata/schemas/DatasetUsageStatistics.avsc +8 -0
  64. datahub/sdk/entity_client.py +22 -7
  65. datahub/sdk/search_client.py +3 -0
  66. datahub/specific/aspect_helpers/fine_grained_lineage.py +76 -0
  67. datahub/specific/datajob.py +15 -1
  68. datahub/specific/dataset.py +37 -59
  69. datahub/utilities/mapping.py +29 -2
  70. datahub/utilities/server_config_util.py +2 -1
  71. {acryl_datahub-1.2.0.3rc1.dist-info → acryl_datahub-1.2.0.4.dist-info}/WHEEL +0 -0
  72. {acryl_datahub-1.2.0.3rc1.dist-info → acryl_datahub-1.2.0.4.dist-info}/entry_points.txt +0 -0
  73. {acryl_datahub-1.2.0.3rc1.dist-info → acryl_datahub-1.2.0.4.dist-info}/licenses/LICENSE +0 -0
  74. {acryl_datahub-1.2.0.3rc1.dist-info → acryl_datahub-1.2.0.4.dist-info}/top_level.txt +0 -0
@@ -549,6 +549,14 @@ class SalesforceApi:
549
549
  capability_name=SourceCapability.TAGS,
550
550
  description="Enabled by default",
551
551
  )
552
+ @capability(
553
+ capability_name=SourceCapability.LINEAGE_COARSE,
554
+ description="Extract table-level lineage for Salesforce objects",
555
+ subtype_modifier=[
556
+ SourceCapabilityModifier.SALESFORCE_CUSTOM_OBJECT,
557
+ SourceCapabilityModifier.SALESFORCE_STANDARD_OBJECT,
558
+ ],
559
+ )
552
560
  class SalesforceSource(StatefulIngestionSourceBase):
553
561
  def __init__(self, config: SalesforceConfig, ctx: PipelineContext) -> None:
554
562
  super().__init__(config, ctx)
@@ -203,38 +203,31 @@ class SlackSourceConfig(
203
203
  description="Bot token for the Slack workspace. Needs `users:read`, `users:read.email`, `users.profile:read`, and `team:read` scopes.",
204
204
  )
205
205
  enrich_user_metadata: bool = Field(
206
- type=bool,
207
- default=True,
206
+ True,
208
207
  description="When enabled, will enrich provisioned DataHub users' metadata with information from Slack.",
209
208
  )
210
209
  ingest_users: bool = Field(
211
- type=bool,
212
- default=True,
210
+ True,
213
211
  description="Whether to ingest users. When set to true, will ingest all users in the Slack workspace (as platform resources) to simplify user enrichment after they are provisioned on DataHub.",
214
212
  )
215
213
  api_requests_per_min: int = Field(
216
- type=int,
217
- default=10,
214
+ 10,
218
215
  description="Number of API requests per minute. Low-level config. Do not tweak unless you are facing any issues.",
219
216
  )
220
217
  ingest_public_channels: bool = Field(
221
- type=bool,
222
- default=False,
218
+ False,
223
219
  description="Whether to ingest public channels. If set to true needs `channels:read` scope.",
224
220
  )
225
221
  channels_iteration_limit: int = Field(
226
- type=int,
227
- default=200,
222
+ 200,
228
223
  description="Limit the number of channels to be ingested in a iteration. Low-level config. Do not tweak unless you are facing any issues.",
229
224
  )
230
225
  channel_min_members: int = Field(
231
- type=int,
232
- default=2,
226
+ 2,
233
227
  description="Ingest channels with at least this many members.",
234
228
  )
235
229
  should_ingest_archived_channels: bool = Field(
236
- type=bool,
237
- default=False,
230
+ False,
238
231
  description="Whether to ingest archived channels.",
239
232
  )
240
233
 
@@ -72,7 +72,7 @@ class ColumnUpstreamJob(BaseModel):
72
72
 
73
73
 
74
74
  class ColumnUpstreamLineage(BaseModel):
75
- column_name: Optional[str]
75
+ column_name: Optional[str] = None
76
76
  upstreams: List[ColumnUpstreamJob] = Field(default_factory=list)
77
77
 
78
78
 
@@ -91,9 +91,9 @@ class Query(BaseModel):
91
91
  class UpstreamLineageEdge(BaseModel):
92
92
  DOWNSTREAM_TABLE_NAME: str
93
93
  DOWNSTREAM_TABLE_DOMAIN: str
94
- UPSTREAM_TABLES: Optional[List[UpstreamTableNode]]
95
- UPSTREAM_COLUMNS: Optional[List[ColumnUpstreamLineage]]
96
- QUERIES: Optional[List[Query]]
94
+ UPSTREAM_TABLES: Optional[List[UpstreamTableNode]] = None
95
+ UPSTREAM_COLUMNS: Optional[List[ColumnUpstreamLineage]] = None
96
+ QUERIES: Optional[List[Query]] = None
97
97
 
98
98
  _json_upstream_tables = pydantic_parse_json("UPSTREAM_TABLES")
99
99
  _json_upstream_columns = pydantic_parse_json("UPSTREAM_COLUMNS")
@@ -99,10 +99,10 @@ class AthenaPropertiesExtractor:
99
99
  """A class to extract properties from Athena CREATE TABLE statements."""
100
100
 
101
101
  CREATE_TABLE_REGEXP = re.compile(
102
- "(CREATE TABLE[\s\n]*)(.*?)(\s*\()", re.MULTILINE | re.IGNORECASE
102
+ r"(CREATE TABLE[\s\n]*)(.*?)(\s*\()", re.MULTILINE | re.IGNORECASE
103
103
  )
104
104
  PARTITIONED_BY_REGEXP = re.compile(
105
- "(PARTITIONED BY[\s\n]*\()((?:[^()]|\([^)]*\))*?)(\))",
105
+ r"(PARTITIONED BY[\s\n]*\()((?:[^()]|\([^)]*\))*?)(\))",
106
106
  re.MULTILINE | re.IGNORECASE,
107
107
  )
108
108
 
@@ -27,6 +27,7 @@ from datahub.ingestion.api.workunit import MetadataWorkUnit
27
27
  from datahub.ingestion.source.common.subtypes import (
28
28
  DatasetContainerSubTypes,
29
29
  DatasetSubTypes,
30
+ SourceCapabilityModifier,
30
31
  )
31
32
  from datahub.ingestion.source.sql.sql_common import (
32
33
  SQLAlchemySource,
@@ -168,6 +169,13 @@ class HiveMetastore(BasicSQLAlchemyConfig):
168
169
  @capability(
169
170
  SourceCapability.LINEAGE_COARSE, "View lineage is not supported", supported=False
170
171
  )
172
+ @capability(
173
+ SourceCapability.CONTAINERS,
174
+ "Enabled by default",
175
+ subtype_modifier=[
176
+ SourceCapabilityModifier.CATALOG,
177
+ ],
178
+ )
171
179
  class HiveMetastoreSource(SQLAlchemySource):
172
180
  """
173
181
  This plugin extracts the following:
@@ -42,6 +42,7 @@ from datahub.ingestion.api.decorators import (
42
42
  )
43
43
  from datahub.ingestion.api.workunit import MetadataWorkUnit
44
44
  from datahub.ingestion.graph.client import DataHubGraph
45
+ from datahub.ingestion.source.common.subtypes import SourceCapabilityModifier
45
46
  from datahub.ingestion.source.sql.sql_common import register_custom_type
46
47
  from datahub.ingestion.source.sql.sql_config import SQLCommonConfig
47
48
  from datahub.ingestion.source.sql.sql_report import SQLSourceReport
@@ -539,7 +540,13 @@ class TeradataConfig(BaseTeradataConfig, BaseTimeWindowConfig):
539
540
  @config_class(TeradataConfig)
540
541
  @support_status(SupportStatus.TESTING)
541
542
  @capability(SourceCapability.DOMAINS, "Enabled by default")
542
- @capability(SourceCapability.CONTAINERS, "Enabled by default")
543
+ @capability(
544
+ SourceCapability.CONTAINERS,
545
+ "Enabled by default",
546
+ subtype_modifier=[
547
+ SourceCapabilityModifier.DATABASE,
548
+ ],
549
+ )
543
550
  @capability(SourceCapability.PLATFORM_INSTANCE, "Enabled by default")
544
551
  @capability(
545
552
  SourceCapability.DELETION_DETECTION,
@@ -36,6 +36,7 @@ from datahub.ingestion.api.decorators import (
36
36
  from datahub.ingestion.api.workunit import MetadataWorkUnit
37
37
  from datahub.ingestion.extractor import schema_util
38
38
  from datahub.ingestion.source.common.data_reader import DataReader
39
+ from datahub.ingestion.source.common.subtypes import SourceCapabilityModifier
39
40
  from datahub.ingestion.source.sql.sql_common import (
40
41
  SQLAlchemySource,
41
42
  SqlWorkUnit,
@@ -249,6 +250,14 @@ class TrinoConfig(BasicSQLAlchemyConfig):
249
250
  @support_status(SupportStatus.CERTIFIED)
250
251
  @capability(SourceCapability.DOMAINS, "Supported via the `domain` config field")
251
252
  @capability(SourceCapability.DATA_PROFILING, "Optionally enabled via configuration")
253
+ @capability(
254
+ SourceCapability.LINEAGE_COARSE,
255
+ "Extract table-level lineage",
256
+ subtype_modifier=[
257
+ SourceCapabilityModifier.TABLE,
258
+ SourceCapabilityModifier.VIEW,
259
+ ],
260
+ )
252
261
  class TrinoSource(SQLAlchemySource):
253
262
  """
254
263
 
@@ -1184,7 +1184,7 @@ class TableauSiteSource:
1184
1184
  self.report.warning(
1185
1185
  title="Incomplete project hierarchy",
1186
1186
  message="Project details missing. Child projects will be ingested without reference to their parent project. We generally need Site Administrator Explorer permissions to extract the complete project hierarchy.",
1187
- context=f"Missing {project.parent_id}, referenced by {project.id} {project.project_name}",
1187
+ context=f"Missing {project.parent_id}, referenced by {project.id} {project.name}",
1188
1188
  )
1189
1189
  project.parent_id = None
1190
1190
 
@@ -8,7 +8,7 @@ import pydantic
8
8
  from pydantic import Field
9
9
  from typing_extensions import Literal
10
10
 
11
- from datahub.configuration.common import AllowDenyPattern, ConfigModel
11
+ from datahub.configuration.common import AllowDenyPattern, ConfigEnum, ConfigModel
12
12
  from datahub.configuration.source_common import (
13
13
  DatasetSourceConfigMixin,
14
14
  LowerCaseDatasetUrnConfigMixin,
@@ -36,6 +36,12 @@ from datahub.utilities.global_warning_util import add_global_warning
36
36
  logger = logging.getLogger(__name__)
37
37
 
38
38
 
39
+ class LineageDataSource(ConfigEnum):
40
+ AUTO = "AUTO"
41
+ SYSTEM_TABLES = "SYSTEM_TABLES"
42
+ API = "API"
43
+
44
+
39
45
  class UnityCatalogProfilerConfig(ConfigModel):
40
46
  method: str = Field(
41
47
  description=(
@@ -243,6 +249,21 @@ class UnityCatalogSourceConfig(
243
249
  description="Option to enable/disable lineage generation. Currently we have to call a rest call per column to get column level lineage due to the Databrick api which can slow down ingestion. ",
244
250
  )
245
251
 
252
+ lineage_data_source: LineageDataSource = pydantic.Field(
253
+ default=LineageDataSource.AUTO,
254
+ description=(
255
+ "Source for lineage data extraction. Options: "
256
+ f"'{LineageDataSource.AUTO.value}' - Use system tables when SQL warehouse is available, fallback to API; "
257
+ f"'{LineageDataSource.SYSTEM_TABLES.value}' - Force use of system.access.table_lineage and system.access.column_lineage tables (requires SQL warehouse); "
258
+ f"'{LineageDataSource.API.value}' - Force use of REST API endpoints for lineage data"
259
+ ),
260
+ )
261
+
262
+ ignore_start_time_lineage: bool = pydantic.Field(
263
+ default=False,
264
+ description="Option to ignore the start_time and retrieve all available lineage. When enabled, the start_time filter will be set to zero to extract all lineage events regardless of the configured time window.",
265
+ )
266
+
246
267
  column_lineage_column_limit: int = pydantic.Field(
247
268
  default=300,
248
269
  description="Limit the number of columns to get column level lineage. ",
@@ -362,6 +383,20 @@ class UnityCatalogSourceConfig(
362
383
 
363
384
  return values
364
385
 
386
+ @pydantic.root_validator(skip_on_failure=True)
387
+ def validate_lineage_data_source_with_warehouse(
388
+ cls, values: Dict[str, Any]
389
+ ) -> Dict[str, Any]:
390
+ lineage_data_source = values.get("lineage_data_source", LineageDataSource.AUTO)
391
+ warehouse_id = values.get("warehouse_id")
392
+
393
+ if lineage_data_source == LineageDataSource.SYSTEM_TABLES and not warehouse_id:
394
+ raise ValueError(
395
+ f"lineage_data_source='{LineageDataSource.SYSTEM_TABLES.value}' requires warehouse_id to be set"
396
+ )
397
+
398
+ return values
399
+
365
400
  @pydantic.validator("schema_pattern", always=True)
366
401
  def schema_pattern_should__always_deny_information_schema(
367
402
  cls, v: AllowDenyPattern