acryl-datahub 1.1.1rc2__py3-none-any.whl → 1.1.1rc4__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.
- {acryl_datahub-1.1.1rc2.dist-info → acryl_datahub-1.1.1rc4.dist-info}/METADATA +2612 -2610
- {acryl_datahub-1.1.1rc2.dist-info → acryl_datahub-1.1.1rc4.dist-info}/RECORD +35 -33
- {acryl_datahub-1.1.1rc2.dist-info → acryl_datahub-1.1.1rc4.dist-info}/WHEEL +1 -1
- datahub/_version.py +1 -1
- datahub/api/entities/dataset/dataset.py +9 -8
- datahub/api/entities/structuredproperties/structuredproperties.py +2 -2
- datahub/cli/ingest_cli.py +9 -1
- datahub/emitter/mce_builder.py +3 -1
- datahub/emitter/response_helper.py +86 -1
- datahub/emitter/rest_emitter.py +1 -1
- datahub/ingestion/source/datahub/config.py +11 -0
- datahub/ingestion/source/datahub/datahub_database_reader.py +186 -33
- datahub/ingestion/source/datahub/datahub_source.py +1 -1
- datahub/ingestion/source/dbt/dbt_common.py +30 -11
- datahub/ingestion/source/hex/query_fetcher.py +9 -3
- datahub/ingestion/source/openapi.py +12 -0
- datahub/ingestion/source/openapi_parser.py +56 -37
- datahub/ingestion/source/snowflake/snowflake_config.py +13 -0
- datahub/ingestion/source/snowflake/snowflake_v2.py +17 -6
- datahub/ingestion/source/sql/sql_types.py +5 -2
- datahub/metadata/_internal_schema_classes.py +515 -515
- datahub/metadata/_urns/urn_defs.py +1785 -1785
- datahub/metadata/schema.avsc +17269 -17639
- datahub/metadata/schemas/DataHubIngestionSourceKey.avsc +2 -1
- datahub/metadata/schemas/ExecutionRequestInput.avsc +5 -0
- datahub/metadata/schemas/__init__.py +3 -3
- datahub/sdk/__init__.py +4 -0
- datahub/sdk/_all_entities.py +4 -0
- datahub/sdk/_shared.py +2 -1
- datahub/sdk/dataflow.py +302 -0
- datahub/sdk/datajob.py +335 -0
- datahub/sdk/entity_client.py +8 -0
- {acryl_datahub-1.1.1rc2.dist-info → acryl_datahub-1.1.1rc4.dist-info}/entry_points.txt +0 -0
- {acryl_datahub-1.1.1rc2.dist-info → acryl_datahub-1.1.1rc4.dist-info}/licenses/LICENSE +0 -0
- {acryl_datahub-1.1.1rc2.dist-info → acryl_datahub-1.1.1rc4.dist-info}/top_level.txt +0 -0
|
@@ -9,6 +9,7 @@ import re
|
|
|
9
9
|
from dataclasses import dataclass
|
|
10
10
|
from typing import Dict, Iterable, List, Optional, Union
|
|
11
11
|
|
|
12
|
+
from datahub.configuration.time_window_config import BaseTimeWindowConfig
|
|
12
13
|
from datahub.ingestion.api.common import PipelineContext
|
|
13
14
|
from datahub.ingestion.api.decorators import (
|
|
14
15
|
SupportStatus,
|
|
@@ -551,11 +552,15 @@ class SnowflakeV2Source(
|
|
|
551
552
|
and len(discovered_views) == 0
|
|
552
553
|
and len(discovered_streams) == 0
|
|
553
554
|
):
|
|
554
|
-
self.
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
555
|
+
if self.config.warn_no_datasets:
|
|
556
|
+
self.structured_reporter.warning(
|
|
557
|
+
"No tables/views/streams found. Verify dataset permissions if Snowflake source is not empty.",
|
|
558
|
+
)
|
|
559
|
+
else:
|
|
560
|
+
self.structured_reporter.failure(
|
|
561
|
+
GENERIC_PERMISSION_ERROR_KEY,
|
|
562
|
+
"No tables/views/streams found. Verify dataset permissions in Snowflake.",
|
|
563
|
+
)
|
|
559
564
|
|
|
560
565
|
self.discovered_datasets = (
|
|
561
566
|
discovered_tables + discovered_views + discovered_streams
|
|
@@ -571,7 +576,11 @@ class SnowflakeV2Source(
|
|
|
571
576
|
queries_extractor = SnowflakeQueriesExtractor(
|
|
572
577
|
connection=self.connection,
|
|
573
578
|
config=SnowflakeQueriesExtractorConfig(
|
|
574
|
-
window=
|
|
579
|
+
window=BaseTimeWindowConfig(
|
|
580
|
+
start_time=self.config.start_time,
|
|
581
|
+
end_time=self.config.end_time,
|
|
582
|
+
bucket_duration=self.config.bucket_duration,
|
|
583
|
+
),
|
|
575
584
|
temporary_tables_pattern=self.config.temporary_tables_pattern,
|
|
576
585
|
include_lineage=self.config.include_table_lineage,
|
|
577
586
|
include_usage_statistics=self.config.include_usage_stats,
|
|
@@ -732,6 +741,8 @@ class SnowflakeV2Source(
|
|
|
732
741
|
return None
|
|
733
742
|
|
|
734
743
|
def is_standard_edition(self) -> bool:
|
|
744
|
+
if self.config.known_snowflake_edition is not None:
|
|
745
|
+
return self.config.known_snowflake_edition == SnowflakeEdition.STANDARD
|
|
735
746
|
try:
|
|
736
747
|
self.connection.query(SnowflakeQuery.show_tags())
|
|
737
748
|
return False
|
|
@@ -284,6 +284,8 @@ SNOWFLAKE_TYPES_MAP: Dict[str, Any] = {
|
|
|
284
284
|
"INTEGER": NumberType,
|
|
285
285
|
"BIGINT": NumberType,
|
|
286
286
|
"SMALLINT": NumberType,
|
|
287
|
+
"TINYINT": NumberType,
|
|
288
|
+
"BYTEINT": NumberType,
|
|
287
289
|
"FLOAT": NumberType,
|
|
288
290
|
"FLOAT4": NumberType,
|
|
289
291
|
"FLOAT8": NumberType,
|
|
@@ -291,6 +293,7 @@ SNOWFLAKE_TYPES_MAP: Dict[str, Any] = {
|
|
|
291
293
|
"DOUBLE PRECISION": NumberType,
|
|
292
294
|
"REAL": NumberType,
|
|
293
295
|
"VARCHAR": StringType,
|
|
296
|
+
"CHARACTER VARYING": StringType,
|
|
294
297
|
"CHAR": StringType,
|
|
295
298
|
"CHARACTER": StringType,
|
|
296
299
|
"STRING": StringType,
|
|
@@ -313,8 +316,8 @@ SNOWFLAKE_TYPES_MAP: Dict[str, Any] = {
|
|
|
313
316
|
|
|
314
317
|
|
|
315
318
|
def resolve_snowflake_modified_type(type_string: str) -> Any:
|
|
316
|
-
# Match types with precision and scale, e.g., 'DECIMAL(38,0)'
|
|
317
|
-
match = re.match(r"([a-
|
|
319
|
+
# Match types with precision and scale, e.g., 'DECIMAL(38,0)' or TIME(3)
|
|
320
|
+
match = re.match(r"([a-z A-Z_]+)\(\d+(,(\s+)?\d+)?\)", type_string)
|
|
318
321
|
if match:
|
|
319
322
|
modified_type_base = match.group(1) # Extract the base type
|
|
320
323
|
return SNOWFLAKE_TYPES_MAP.get(modified_type_base)
|