acryl-datahub 1.2.0.7rc1__py3-none-any.whl → 1.2.0.7rc2__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.2.0.7rc1.dist-info → acryl_datahub-1.2.0.7rc2.dist-info}/METADATA +2589 -2571
- {acryl_datahub-1.2.0.7rc1.dist-info → acryl_datahub-1.2.0.7rc2.dist-info}/RECORD +11 -11
- datahub/_version.py +1 -1
- datahub/ingestion/source/snowflake/constants.py +2 -0
- datahub/ingestion/source/snowflake/snowflake_connection.py +15 -4
- datahub/ingestion/source/snowflake/snowflake_utils.py +18 -5
- datahub/ingestion/source/snowflake/snowflake_v2.py +1 -0
- {acryl_datahub-1.2.0.7rc1.dist-info → acryl_datahub-1.2.0.7rc2.dist-info}/WHEEL +0 -0
- {acryl_datahub-1.2.0.7rc1.dist-info → acryl_datahub-1.2.0.7rc2.dist-info}/entry_points.txt +0 -0
- {acryl_datahub-1.2.0.7rc1.dist-info → acryl_datahub-1.2.0.7rc2.dist-info}/licenses/LICENSE +0 -0
- {acryl_datahub-1.2.0.7rc1.dist-info → acryl_datahub-1.2.0.7rc2.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
acryl_datahub-1.2.0.
|
|
1
|
+
acryl_datahub-1.2.0.7rc2.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=
|
|
4
|
+
datahub/_version.py,sha256=MPA0HDzblQ8piTYcO_knX26mEN6TmH8CFrRue4iAk1c,323
|
|
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
|
|
@@ -484,12 +484,12 @@ datahub/ingestion/source/sigma/sigma_api.py,sha256=7PK5AQa838hYeaQ5L0dioi4n4bLrp
|
|
|
484
484
|
datahub/ingestion/source/slack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
485
485
|
datahub/ingestion/source/slack/slack.py,sha256=JWanUfzFGynV_PWcH0YzJIbRcmL880DA6dEI9QW-QiQ,25800
|
|
486
486
|
datahub/ingestion/source/snowflake/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
487
|
-
datahub/ingestion/source/snowflake/constants.py,sha256=
|
|
487
|
+
datahub/ingestion/source/snowflake/constants.py,sha256=iDTamMozHwLYyglpRfqwTbxPxYPhb-uJGRHIgDRHUkA,2767
|
|
488
488
|
datahub/ingestion/source/snowflake/oauth_config.py,sha256=ol9D3RmruGStJAeL8PYSQguSqcD2HfkjPkMF2AB_eZs,1277
|
|
489
489
|
datahub/ingestion/source/snowflake/oauth_generator.py,sha256=fu2VnREGuJXeTqIV2jx4TwieVnznf83HQkrE0h2DGGM,3423
|
|
490
490
|
datahub/ingestion/source/snowflake/snowflake_assertion.py,sha256=_l3k4aI9wvioE81xxdeizJn9nJCZ_nMIXgk9N6pEk5o,4803
|
|
491
491
|
datahub/ingestion/source/snowflake/snowflake_config.py,sha256=b-VZcv6GAHxT-jn5365ex0s71MKyA5WK43bGH6qCvNc,23570
|
|
492
|
-
datahub/ingestion/source/snowflake/snowflake_connection.py,sha256=
|
|
492
|
+
datahub/ingestion/source/snowflake/snowflake_connection.py,sha256=96_TNIhiRndgxEnGqHoG0VUQOhX8FmnBLN1qaXqgTGg,18920
|
|
493
493
|
datahub/ingestion/source/snowflake/snowflake_data_reader.py,sha256=ffR5E2uhD71FUMXd3XOg2rHwrp1rbbGEFTAbqKcmI2s,2195
|
|
494
494
|
datahub/ingestion/source/snowflake/snowflake_lineage_v2.py,sha256=a2vDWZNthV3AqD3Y_Rd4lHSZbaiyuEc--WXWcJqcV0k,21711
|
|
495
495
|
datahub/ingestion/source/snowflake/snowflake_profiler.py,sha256=PmQi-qDlRhdJ-PsJ7x-EScIiswWRAxDDOKHydvN3mTY,7404
|
|
@@ -502,8 +502,8 @@ datahub/ingestion/source/snowflake/snowflake_shares.py,sha256=maZyFkfrbVogEFM0tT
|
|
|
502
502
|
datahub/ingestion/source/snowflake/snowflake_summary.py,sha256=5Li4H8KuS4qBKR98L2P-JZI79UXsOjcAFxZZyio9NU0,5787
|
|
503
503
|
datahub/ingestion/source/snowflake/snowflake_tag.py,sha256=eA9xh-G1Ydr1OwUUtrbXUWp26hE1jF0zvyKNky_i_nQ,8887
|
|
504
504
|
datahub/ingestion/source/snowflake/snowflake_usage_v2.py,sha256=mM0v9b4PHRJAT-SdRids3wdzc5O96gWCCww3e42itV8,24982
|
|
505
|
-
datahub/ingestion/source/snowflake/snowflake_utils.py,sha256=
|
|
506
|
-
datahub/ingestion/source/snowflake/snowflake_v2.py,sha256=
|
|
505
|
+
datahub/ingestion/source/snowflake/snowflake_utils.py,sha256=dmgpwApayUIevyn6l55mSWBXzYK6nPs8ItwcrvdXdIA,15007
|
|
506
|
+
datahub/ingestion/source/snowflake/snowflake_v2.py,sha256=ox9C5CGPkdvfnbmi6ZdxhG8dCag8ydDQhSI4uL-_aZ0,35691
|
|
507
507
|
datahub/ingestion/source/snowflake/stored_proc_lineage.py,sha256=rOb78iHiWiK8v8WdVs1xDwVut4Y0OHmszej6IopQfCo,5341
|
|
508
508
|
datahub/ingestion/source/sql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
509
509
|
datahub/ingestion/source/sql/athena.py,sha256=TPKwL9oRiZlVnqIsOSBWUEwyvoW-1ssXvY4PfjxOR6g,28175
|
|
@@ -1112,8 +1112,8 @@ datahub_provider/operators/datahub_assertion_operator.py,sha256=uvTQ-jk2F0sbqqxp
|
|
|
1112
1112
|
datahub_provider/operators/datahub_assertion_sensor.py,sha256=lCBj_3x1cf5GMNpHdfkpHuyHfVxsm6ff5x2Z5iizcAo,140
|
|
1113
1113
|
datahub_provider/operators/datahub_operation_operator.py,sha256=aevDp2FzX7FxGlXrR0khoHNbxbhKR2qPEX5e8O2Jyzw,174
|
|
1114
1114
|
datahub_provider/operators/datahub_operation_sensor.py,sha256=8fcdVBCEPgqy1etTXgLoiHoJrRt_nzFZQMdSzHqSG7M,168
|
|
1115
|
-
acryl_datahub-1.2.0.
|
|
1116
|
-
acryl_datahub-1.2.0.
|
|
1117
|
-
acryl_datahub-1.2.0.
|
|
1118
|
-
acryl_datahub-1.2.0.
|
|
1119
|
-
acryl_datahub-1.2.0.
|
|
1115
|
+
acryl_datahub-1.2.0.7rc2.dist-info/METADATA,sha256=FrDiXUp5syCkV4y1XofMS2D5DQyuIJdBwly-V55zkJ8,186394
|
|
1116
|
+
acryl_datahub-1.2.0.7rc2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1117
|
+
acryl_datahub-1.2.0.7rc2.dist-info/entry_points.txt,sha256=qopCAD6qrsijaZ9mTw3UlPCKsE00C3t9MbkkWow7pi4,9943
|
|
1118
|
+
acryl_datahub-1.2.0.7rc2.dist-info/top_level.txt,sha256=iLjSrLK5ox1YVYcglRUkcvfZPvKlobBWx7CTUXx8_GI,25
|
|
1119
|
+
acryl_datahub-1.2.0.7rc2.dist-info/RECORD,,
|
datahub/_version.py
CHANGED
|
@@ -22,6 +22,7 @@ from datahub.ingestion.api.closeable import Closeable
|
|
|
22
22
|
from datahub.ingestion.source.snowflake.constants import (
|
|
23
23
|
CLIENT_PREFETCH_THREADS,
|
|
24
24
|
CLIENT_SESSION_KEEP_ALIVE,
|
|
25
|
+
DEFAULT_SNOWFLAKE_DOMAIN,
|
|
25
26
|
)
|
|
26
27
|
from datahub.ingestion.source.snowflake.oauth_config import (
|
|
27
28
|
OAuthConfiguration,
|
|
@@ -47,8 +48,6 @@ _VALID_AUTH_TYPES: Dict[str, str] = {
|
|
|
47
48
|
"OAUTH_AUTHENTICATOR_TOKEN": OAUTH_AUTHENTICATOR,
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
_SNOWFLAKE_HOST_SUFFIX = ".snowflakecomputing.com"
|
|
51
|
-
|
|
52
51
|
|
|
53
52
|
class SnowflakePermissionError(MetaError):
|
|
54
53
|
"""A permission error has happened"""
|
|
@@ -110,6 +109,10 @@ class SnowflakeConnectionConfig(ConfigModel):
|
|
|
110
109
|
default=None,
|
|
111
110
|
description="OAuth token from external identity provider. Not recommended for most use cases because it will not be able to refresh once expired.",
|
|
112
111
|
)
|
|
112
|
+
snowflake_domain: str = pydantic.Field(
|
|
113
|
+
default=DEFAULT_SNOWFLAKE_DOMAIN,
|
|
114
|
+
description="Snowflake domain. Use 'snowflakecomputing.com' for most regions or 'snowflakecomputing.cn' for China (cn-northwest-1) region.",
|
|
115
|
+
)
|
|
113
116
|
|
|
114
117
|
def get_account(self) -> str:
|
|
115
118
|
assert self.account_id
|
|
@@ -118,10 +121,13 @@ class SnowflakeConnectionConfig(ConfigModel):
|
|
|
118
121
|
rename_host_port_to_account_id = pydantic_renamed_field("host_port", "account_id")
|
|
119
122
|
|
|
120
123
|
@pydantic.validator("account_id")
|
|
121
|
-
def validate_account_id(cls, account_id: str) -> str:
|
|
124
|
+
def validate_account_id(cls, account_id: str, values: Dict) -> str:
|
|
122
125
|
account_id = remove_protocol(account_id)
|
|
123
126
|
account_id = remove_trailing_slashes(account_id)
|
|
124
|
-
|
|
127
|
+
# Get the domain from config, fallback to default
|
|
128
|
+
domain = values.get("snowflake_domain", DEFAULT_SNOWFLAKE_DOMAIN)
|
|
129
|
+
snowflake_host_suffix = f".{domain}"
|
|
130
|
+
account_id = remove_suffix(account_id, snowflake_host_suffix)
|
|
125
131
|
return account_id
|
|
126
132
|
|
|
127
133
|
@pydantic.validator("authentication_type", always=True)
|
|
@@ -311,6 +317,7 @@ class SnowflakeConnectionConfig(ConfigModel):
|
|
|
311
317
|
warehouse=self.warehouse,
|
|
312
318
|
authenticator=_VALID_AUTH_TYPES.get(self.authentication_type),
|
|
313
319
|
application=_APPLICATION_NAME,
|
|
320
|
+
host=f"{self.account_id}.{self.snowflake_domain}",
|
|
314
321
|
**connect_args,
|
|
315
322
|
)
|
|
316
323
|
|
|
@@ -324,6 +331,7 @@ class SnowflakeConnectionConfig(ConfigModel):
|
|
|
324
331
|
role=self.role,
|
|
325
332
|
authenticator=_VALID_AUTH_TYPES.get(self.authentication_type),
|
|
326
333
|
application=_APPLICATION_NAME,
|
|
334
|
+
host=f"{self.account_id}.{self.snowflake_domain}",
|
|
327
335
|
**connect_args,
|
|
328
336
|
)
|
|
329
337
|
|
|
@@ -337,6 +345,7 @@ class SnowflakeConnectionConfig(ConfigModel):
|
|
|
337
345
|
warehouse=self.warehouse,
|
|
338
346
|
role=self.role,
|
|
339
347
|
application=_APPLICATION_NAME,
|
|
348
|
+
host=f"{self.account_id}.{self.snowflake_domain}",
|
|
340
349
|
**connect_args,
|
|
341
350
|
)
|
|
342
351
|
elif self.authentication_type == "OAUTH_AUTHENTICATOR_TOKEN":
|
|
@@ -348,6 +357,7 @@ class SnowflakeConnectionConfig(ConfigModel):
|
|
|
348
357
|
warehouse=self.warehouse,
|
|
349
358
|
role=self.role,
|
|
350
359
|
application=_APPLICATION_NAME,
|
|
360
|
+
host=f"{self.account_id}.{self.snowflake_domain}",
|
|
351
361
|
**connect_args,
|
|
352
362
|
)
|
|
353
363
|
elif self.authentication_type == "OAUTH_AUTHENTICATOR":
|
|
@@ -363,6 +373,7 @@ class SnowflakeConnectionConfig(ConfigModel):
|
|
|
363
373
|
role=self.role,
|
|
364
374
|
authenticator=_VALID_AUTH_TYPES.get(self.authentication_type),
|
|
365
375
|
application=_APPLICATION_NAME,
|
|
376
|
+
host=f"{self.account_id}.{self.snowflake_domain}",
|
|
366
377
|
**connect_args,
|
|
367
378
|
)
|
|
368
379
|
else:
|
|
@@ -9,6 +9,7 @@ from datahub.emitter.mce_builder import (
|
|
|
9
9
|
from datahub.emitter.mcp_builder import DatabaseKey, SchemaKey
|
|
10
10
|
from datahub.ingestion.api.source import SourceReport
|
|
11
11
|
from datahub.ingestion.source.snowflake.constants import (
|
|
12
|
+
DEFAULT_SNOWFLAKE_DOMAIN,
|
|
12
13
|
SNOWFLAKE_REGION_CLOUD_REGION_MAPPING,
|
|
13
14
|
SnowflakeCloudProvider,
|
|
14
15
|
SnowflakeObjectDomain,
|
|
@@ -34,16 +35,21 @@ class SnowsightUrlBuilder:
|
|
|
34
35
|
"us-east-1",
|
|
35
36
|
"eu-west-1",
|
|
36
37
|
"eu-central-1",
|
|
37
|
-
"ap-southeast-1",
|
|
38
38
|
"ap-southeast-2",
|
|
39
39
|
]
|
|
40
40
|
|
|
41
41
|
snowsight_base_url: str
|
|
42
42
|
|
|
43
|
-
def __init__(
|
|
43
|
+
def __init__(
|
|
44
|
+
self,
|
|
45
|
+
account_locator: str,
|
|
46
|
+
region: str,
|
|
47
|
+
privatelink: bool = False,
|
|
48
|
+
snowflake_domain: str = DEFAULT_SNOWFLAKE_DOMAIN,
|
|
49
|
+
):
|
|
44
50
|
cloud, cloud_region_id = self.get_cloud_region_from_snowflake_region_id(region)
|
|
45
51
|
self.snowsight_base_url = self.create_snowsight_base_url(
|
|
46
|
-
account_locator, cloud_region_id, cloud, privatelink
|
|
52
|
+
account_locator, cloud_region_id, cloud, privatelink, snowflake_domain
|
|
47
53
|
)
|
|
48
54
|
|
|
49
55
|
@staticmethod
|
|
@@ -52,6 +58,7 @@ class SnowsightUrlBuilder:
|
|
|
52
58
|
cloud_region_id: str,
|
|
53
59
|
cloud: str,
|
|
54
60
|
privatelink: bool = False,
|
|
61
|
+
snowflake_domain: str = DEFAULT_SNOWFLAKE_DOMAIN,
|
|
55
62
|
) -> str:
|
|
56
63
|
if cloud:
|
|
57
64
|
url_cloud_provider_suffix = f".{cloud}"
|
|
@@ -67,9 +74,15 @@ class SnowsightUrlBuilder:
|
|
|
67
74
|
else:
|
|
68
75
|
url_cloud_provider_suffix = f".{cloud}"
|
|
69
76
|
if privatelink:
|
|
70
|
-
url = f"https://app.{account_locator}.{cloud_region_id}.privatelink.
|
|
77
|
+
url = f"https://app.{account_locator}.{cloud_region_id}.privatelink.{snowflake_domain}/"
|
|
71
78
|
else:
|
|
72
|
-
|
|
79
|
+
# Standard Snowsight URL format - works for most regions
|
|
80
|
+
# China region may use app.snowflake.cn instead of app.snowflake.com. This is not documented, just
|
|
81
|
+
# guessing Based on existence of snowflake.cn domain (https://domainindex.com/domains/snowflake.cn)
|
|
82
|
+
if snowflake_domain == "snowflakecomputing.cn":
|
|
83
|
+
url = f"https://app.snowflake.cn/{cloud_region_id}{url_cloud_provider_suffix}/{account_locator}/"
|
|
84
|
+
else:
|
|
85
|
+
url = f"https://app.snowflake.com/{cloud_region_id}{url_cloud_provider_suffix}/{account_locator}/"
|
|
73
86
|
return url
|
|
74
87
|
|
|
75
88
|
@staticmethod
|
|
@@ -750,6 +750,7 @@ class SnowflakeV2Source(
|
|
|
750
750
|
# For privatelink, account identifier ends with .privatelink
|
|
751
751
|
# See https://docs.snowflake.com/en/user-guide/organizations-connect.html#private-connectivity-urls
|
|
752
752
|
privatelink=self.config.account_id.endswith(".privatelink"),
|
|
753
|
+
snowflake_domain=self.config.snowflake_domain,
|
|
753
754
|
)
|
|
754
755
|
|
|
755
756
|
except Exception as e:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|