acryl-datahub 1.0.0.3rc11__py3-none-any.whl → 1.0.0.3rc12__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.0.0.3rc11.dist-info/licenses/LICENSE,sha256=9xNHpsD0uYF5ONzXsKDCuHHB-xbiCrSbueWXqrTNsxk,11365
1
+ acryl_datahub-1.0.0.3rc12.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=twce5d4IphdpniEHSuyITBxTGY0-8pqvE-ojb42fqFs,324
4
+ datahub/_version.py,sha256=GsdkGKv5g7BK04mNrjmP0H1a3Wlz4nl0YfMuvCp1f_c,324
5
5
  datahub/entrypoints.py,sha256=AQN5MzCe6q3LKI4SS6WmwN56kgjF6AC1ld7yELWVP2w,8953
6
6
  datahub/errors.py,sha256=p5rFAdAGVCk4Lqolol1YvthceadUSwpaCxLXRcyCCFQ,676
7
7
  datahub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -171,7 +171,7 @@ datahub/ingestion/glossary/classifier.py,sha256=daLxnVv_JlfB_jBOxH5LrU_xQRndrsGo
171
171
  datahub/ingestion/glossary/classifier_registry.py,sha256=yFOYLQhDgCLqXYMG3L1BquXafeLcZDcmp8meyw6k9ts,307
172
172
  datahub/ingestion/glossary/datahub_classifier.py,sha256=O7wm6gQT1Jf2QSKdWjJQbS5oSzJwplXzfza26Gdq5Mg,7555
173
173
  datahub/ingestion/graph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
174
- datahub/ingestion/graph/client.py,sha256=Mtnidbtkd14r-bp8gN1rlBFiOSTJI7SvstBdCRp9uYU,70314
174
+ datahub/ingestion/graph/client.py,sha256=a4cQPgElfW-IuBV_78pN5gM6rJe-PN7yK77jFana924,70296
175
175
  datahub/ingestion/graph/config.py,sha256=sPBwa7_v10B4sR0mW7ssQli3ljb6hdZd2Xeaq4Jhs6Y,1087
176
176
  datahub/ingestion/graph/connections.py,sha256=9462L0ZWGKURyypAln25eMPhK3pcufBar9tNDoqspXs,741
177
177
  datahub/ingestion/graph/entity_versioning.py,sha256=nrcNz0Qm6kpE6oTu_mrYUQDx14KPspBTc6R9SyFUY6c,6901
@@ -307,7 +307,7 @@ datahub/ingestion/source/dremio/dremio_source.py,sha256=_52Z0ifntbhYNwlrMs6jZ59C
307
307
  datahub/ingestion/source/dremio/dremio_sql_queries.py,sha256=W0rcXawlwJOHNYr5o73rilMijtFOO3cVkn6pY-JLc6o,8186
308
308
  datahub/ingestion/source/dynamodb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
309
309
  datahub/ingestion/source/dynamodb/data_reader.py,sha256=vC77KpcP8LJN0g8wsPRDVw4sebv0ZWIP3tJkEIHaomA,3120
310
- datahub/ingestion/source/dynamodb/dynamodb.py,sha256=Z1cwomrAgTfBfSdVtG-Tfbn_--2STY6wTsm6VoACVA4,22625
310
+ datahub/ingestion/source/dynamodb/dynamodb.py,sha256=vM3Ia5rZidqOcdPPigpuo6-7Ipoof8eF3RwxJ3SX2Ck,22771
311
311
  datahub/ingestion/source/fivetran/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
312
312
  datahub/ingestion/source/fivetran/config.py,sha256=BP3KRfAQ6H5qyEeJNu9vNfZNwLoyj4Tl2kXiLVR5DNM,9027
313
313
  datahub/ingestion/source/fivetran/data_classes.py,sha256=ecdUJH5BEze0yv-uFpKWPNaNmV1gORDA2XMFk0zhcBw,595
@@ -474,7 +474,7 @@ datahub/ingestion/source/sql/cockroachdb.py,sha256=XaD7eae34plU9ISRC6PzYX9q6RdT2
474
474
  datahub/ingestion/source/sql/druid.py,sha256=_tzgTa5jhPUXk6WCmS7p10feCwJm6yUFcOgMZA-OcE8,2922
475
475
  datahub/ingestion/source/sql/hana.py,sha256=0PIvcX0Rz59NyR7Ag5Bv1MBV_UbJwxl9UAopo_xe_CA,1342
476
476
  datahub/ingestion/source/sql/hive.py,sha256=voQl6QjHUXPdx7LPONuHiFavW9nRKMjHZx7o3vJQG7A,31034
477
- datahub/ingestion/source/sql/hive_metastore.py,sha256=HW0zoHKarBYb8oVCy5fHvPOn-pTo25LctW_AusmH0hQ,36252
477
+ datahub/ingestion/source/sql/hive_metastore.py,sha256=ZzRPmieCf_9LOq9NeSPZhDn2txQ6t-xrskgE-0e5g0k,36232
478
478
  datahub/ingestion/source/sql/mariadb.py,sha256=Hm102kmfs_1rd4lsTYhzVMZq5S3B6cyfvpHSzJjqvMw,737
479
479
  datahub/ingestion/source/sql/mysql.py,sha256=nDWK4YbqomcJgnit9b8geUGrp_3eix4bt0_k94o7g-0,3350
480
480
  datahub/ingestion/source/sql/oracle.py,sha256=ftnrk3iiEelyv9PBHPYbairuP1WgxZbi1gu6YdqY69E,29965
@@ -995,7 +995,7 @@ datahub/utilities/sample_data.py,sha256=DMwN3yAqJPrF_rZF6CU0_iLSNBFfsAQ-no0KQhgw
995
995
  datahub/utilities/search_utils.py,sha256=BdZfixXrB6lcD_ec6pCotGtVKQ4ekTtmaZDFGyeZfBg,9683
996
996
  datahub/utilities/sentinels.py,sha256=p299J2YR62K2Mbuy-2lrGH4BnF9dkRqGo59Wub0hYV4,417
997
997
  datahub/utilities/serialized_lru_cache.py,sha256=R9enyN5BlatknX4KFq9euYc2yiE1rRMucPbAHg09Goc,3247
998
- datahub/utilities/server_config_util.py,sha256=m5n_9rhORXJaqCaSiTSLT-omhFP8W6puKtbhwdhJqvA,13039
998
+ datahub/utilities/server_config_util.py,sha256=ZHB4JtQN-z9J-9QQnXw-S-sb8g24PP92uOeSN1LP1tg,12032
999
999
  datahub/utilities/sql_formatter.py,sha256=tYXIsKjKmpKh0JXGxeAPrHkUWYd1SwJNLjUZsfQP2h0,1016
1000
1000
  datahub/utilities/sqlalchemy_query_combiner.py,sha256=oxW20uXz8hV1Zb4fLXvTQ7c3LjACBsrF58TR2_-RSps,14982
1001
1001
  datahub/utilities/sqlalchemy_type_converter.py,sha256=H4S4xnnyPozDBHFhBh4rjjoXa5novFzYIUBJy2KSrVc,9805
@@ -1050,8 +1050,8 @@ datahub_provider/operators/datahub_assertion_operator.py,sha256=uvTQ-jk2F0sbqqxp
1050
1050
  datahub_provider/operators/datahub_assertion_sensor.py,sha256=lCBj_3x1cf5GMNpHdfkpHuyHfVxsm6ff5x2Z5iizcAo,140
1051
1051
  datahub_provider/operators/datahub_operation_operator.py,sha256=aevDp2FzX7FxGlXrR0khoHNbxbhKR2qPEX5e8O2Jyzw,174
1052
1052
  datahub_provider/operators/datahub_operation_sensor.py,sha256=8fcdVBCEPgqy1etTXgLoiHoJrRt_nzFZQMdSzHqSG7M,168
1053
- acryl_datahub-1.0.0.3rc11.dist-info/METADATA,sha256=ExpPg4Ny4XSUtMdD_mf4VyfzT-uL0S8aeqWSk0-lJzY,180030
1054
- acryl_datahub-1.0.0.3rc11.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
1055
- acryl_datahub-1.0.0.3rc11.dist-info/entry_points.txt,sha256=o3mDeJXSKhsy7XLkuogihraiabBdLn9HaizYXPrxmk0,9710
1056
- acryl_datahub-1.0.0.3rc11.dist-info/top_level.txt,sha256=iLjSrLK5ox1YVYcglRUkcvfZPvKlobBWx7CTUXx8_GI,25
1057
- acryl_datahub-1.0.0.3rc11.dist-info/RECORD,,
1053
+ acryl_datahub-1.0.0.3rc12.dist-info/METADATA,sha256=FXy_GoGEMFkaahaoHBzthO6IV2K3vDf21hu91Ef_nHo,180030
1054
+ acryl_datahub-1.0.0.3rc12.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
1055
+ acryl_datahub-1.0.0.3rc12.dist-info/entry_points.txt,sha256=o3mDeJXSKhsy7XLkuogihraiabBdLn9HaizYXPrxmk0,9710
1056
+ acryl_datahub-1.0.0.3rc12.dist-info/top_level.txt,sha256=iLjSrLK5ox1YVYcglRUkcvfZPvKlobBWx7CTUXx8_GI,25
1057
+ acryl_datahub-1.0.0.3rc12.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.0.0.3rc11"
3
+ __version__ = "1.0.0.3rc12"
4
4
 
5
5
 
6
6
  def is_dev_mode() -> bool:
@@ -361,7 +361,7 @@ class DataHubGraph(DatahubRestEmitter, EntityVersioningAPI):
361
361
  )
362
362
 
363
363
  def get_config(self) -> Dict[str, Any]:
364
- return self._get_generic(f"{self.config.server}/config")
364
+ return self.get_server_config().config
365
365
 
366
366
  def get_ownership(self, entity_urn: str) -> Optional[OwnershipClass]:
367
367
  return self.get_aspect(entity_urn=entity_urn, aspect_type=OwnershipClass)
@@ -474,6 +474,7 @@ class DynamoDBSource(StatefulIngestionSourceBase):
474
474
  dataset_properties.customProperties["schema.downsampled"] = "True"
475
475
  dataset_properties.customProperties["schema.totalFields"] = f"{schema_size}"
476
476
  # append each schema field, schema will be sorted by count descending and delimited_name ascending and sliced to only include MAX_SCHEMA_SIZE items
477
+ primary_keys = []
477
478
  for schema_field in sorted(
478
479
  table_fields,
479
480
  key=lambda x: (
@@ -484,22 +485,23 @@ class DynamoDBSource(StatefulIngestionSourceBase):
484
485
  field_path = schema_field["delimited_name"]
485
486
  native_data_type = self.get_native_type(schema_field["type"], table_name)
486
487
  type = self.get_field_type(schema_field["type"], table_name)
487
- description = None
488
488
  nullable = True
489
489
  if field_path in primary_key_dict:
490
- description = (
490
+ # primary key should not be nullable
491
+ type_key = (
491
492
  "Partition Key"
492
493
  if primary_key_dict.get(field_path) == "HASH"
493
494
  else "Sort Key"
494
495
  )
495
- # primary key should not be nullable
496
+ dataset_properties.customProperties[type_key] = field_path
496
497
  nullable = False
498
+ primary_keys.append(field_path)
497
499
 
498
500
  field = SchemaField(
499
501
  fieldPath=field_path,
500
502
  nativeDataType=native_data_type,
501
503
  type=type,
502
- description=description,
504
+ description=None,
503
505
  nullable=nullable,
504
506
  recursive=False,
505
507
  )
@@ -513,6 +515,7 @@ class DynamoDBSource(StatefulIngestionSourceBase):
513
515
  hash="",
514
516
  platformSchema=SchemalessClass(),
515
517
  fields=canonical_schema,
518
+ primaryKeys=primary_keys,
516
519
  )
517
520
  return schema_metadata
518
521
 
@@ -67,10 +67,10 @@ TableKey = namedtuple("TableKey", ["schema", "table"])
67
67
 
68
68
 
69
69
  class HiveMetastoreConfigMode(StrEnum):
70
- hive: str = "hive"
71
- presto: str = "presto"
72
- presto_on_hive: str = "presto-on-hive"
73
- trino: str = "trino"
70
+ hive = "hive"
71
+ presto = "presto"
72
+ presto_on_hive = "presto-on-hive"
73
+ trino = "trino"
74
74
 
75
75
 
76
76
  @dataclass
@@ -44,15 +44,8 @@ class ServiceFeature(Enum):
44
44
 
45
45
 
46
46
  _REQUIRED_VERSION_OPENAPI_TRACING = {
47
- "acryl": (
48
- 0,
49
- 3,
50
- 11,
51
- 0,
52
- ), # Requires v0.3.11.0 or higher for acryl versions
53
- "cloud": (0, 3, 11, 0), # Special case for '-cloud' suffix
54
- "any_suffix": (0, 3, 11, 0), # Generic requirement for any other suffix
55
- "none": (1, 0, 1, 0), # Requirement for versions without suffix
47
+ "cloud": (0, 3, 11, 0),
48
+ "core": (1, 0, 1, 0),
56
49
  }
57
50
 
58
51
 
@@ -259,7 +252,7 @@ class RestServiceConfig:
259
252
  Check if DataHub Cloud is enabled.
260
253
 
261
254
  Returns:
262
- True if the server environment is not 'oss'
255
+ True if the server environment is not 'core'
263
256
  """
264
257
  datahub_config = self.config.get("datahub") or {}
265
258
  server_env = datahub_config.get("serverEnv")
@@ -268,17 +261,12 @@ class RestServiceConfig:
268
261
  if not server_env:
269
262
  return False
270
263
 
271
- return server_env != "oss"
264
+ return server_env != "core"
272
265
 
273
266
  def supports_feature(self, feature: ServiceFeature) -> bool:
274
267
  """
275
- Determines whether a specific feature is supported based on service version.
276
-
277
- Version categorization follows these rules:
278
- 1. Has '-acryl' suffix (highest priority)
279
- 2. Has a specific known suffix (e.g. '-other')
280
- 3. Has some other suffix (catchall for any suffix)
281
- 4. No suffix
268
+ Determines whether a specific feature is supported based on service version
269
+ and whether this is a cloud deployment or not.
282
270
 
283
271
  Args:
284
272
  feature: Feature enum value to check
@@ -286,32 +274,7 @@ class RestServiceConfig:
286
274
  Returns:
287
275
  Boolean indicating whether the feature is supported
288
276
  """
289
- version = self.service_version
290
- if not version:
291
- return False
292
-
293
- # Determine the suffix category
294
- suffix_category = "none" # Default: no suffix
295
-
296
- if "-" in version:
297
- suffix = version.split("-", 1)[1]
298
-
299
- if suffix == "acryl":
300
- suffix_category = "acryl"
301
- elif suffix == "cloud": # Example of a specific override
302
- suffix_category = "cloud"
303
- else:
304
- suffix_category = "any_suffix" # Catchall for any other suffix
305
-
306
- # Define feature requirements based on version scheme
307
- # This can be expanded to include more features
308
- feature_requirements = {
309
- ServiceFeature.OPEN_API_SDK: _REQUIRED_VERSION_OPENAPI_TRACING,
310
- ServiceFeature.API_TRACING: _REQUIRED_VERSION_OPENAPI_TRACING,
311
- # Additional features can be defined here
312
- }
313
-
314
- # Special handling for features that rely on config flags instead of version
277
+ # Special handling for features that rely on config flags
315
278
  config_based_features = {
316
279
  ServiceFeature.NO_CODE: lambda: self.is_no_code_enabled,
317
280
  ServiceFeature.STATEFUL_INGESTION: lambda: self.config.get(
@@ -327,27 +290,36 @@ class RestServiceConfig:
327
290
  ServiceFeature.CLI_TELEMETRY: lambda: (
328
291
  self.config.get("telemetry") or {}
329
292
  ).get("enabledCli", None),
330
- # Add more config-based feature checks as needed
293
+ ServiceFeature.DATAHUB_CLOUD: lambda: self.is_datahub_cloud,
331
294
  }
332
295
 
333
296
  # Check if this is a config-based feature
334
297
  if feature in config_based_features:
335
298
  return config_based_features[feature]()
336
299
 
300
+ # For environment-based features, determine requirements based on cloud vs. non-cloud
301
+ deployment_type = "cloud" if self.is_datahub_cloud else "core"
302
+
303
+ # Define feature requirements
304
+ feature_requirements = {
305
+ ServiceFeature.OPEN_API_SDK: _REQUIRED_VERSION_OPENAPI_TRACING,
306
+ ServiceFeature.API_TRACING: _REQUIRED_VERSION_OPENAPI_TRACING,
307
+ # Additional features can be defined here
308
+ }
309
+
337
310
  # Check if the feature exists in our requirements dictionary
338
311
  if feature not in feature_requirements:
339
312
  # Unknown feature, assume not supported
340
313
  return False
341
314
 
342
- # Get version requirements for this feature and version category
315
+ # Get version requirements for this feature and deployment type
343
316
  feature_reqs = feature_requirements[feature]
344
- requirements = feature_reqs.get(suffix_category)
317
+ requirements = feature_reqs.get(deployment_type)
345
318
 
346
319
  if not requirements:
347
- # Fallback to the no-suffix requirements if specific requirements aren't defined
348
- requirements = feature_reqs.get(
349
- "none", (99, 99, 99, 99)
350
- ) # Very high version if none defined
320
+ # If no specific requirements defined for this deployment type,
321
+ # assume feature is not supported
322
+ return False
351
323
 
352
324
  # Check if the current version meets the requirements
353
325
  req_major, req_minor, req_patch, req_build = requirements