acryl-datahub 1.0.0.3rc5__py3-none-any.whl → 1.0.0.3rc6__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.0.0.3rc5.dist-info → acryl_datahub-1.0.0.3rc6.dist-info}/METADATA +2559 -2559
- {acryl_datahub-1.0.0.3rc5.dist-info → acryl_datahub-1.0.0.3rc6.dist-info}/RECORD +9 -9
- datahub/_version.py +1 -1
- datahub/ingestion/source/looker/looker_common.py +17 -2
- datahub/ingestion/source/looker/looker_source.py +34 -5
- {acryl_datahub-1.0.0.3rc5.dist-info → acryl_datahub-1.0.0.3rc6.dist-info}/WHEEL +0 -0
- {acryl_datahub-1.0.0.3rc5.dist-info → acryl_datahub-1.0.0.3rc6.dist-info}/entry_points.txt +0 -0
- {acryl_datahub-1.0.0.3rc5.dist-info → acryl_datahub-1.0.0.3rc6.dist-info}/licenses/LICENSE +0 -0
- {acryl_datahub-1.0.0.3rc5.dist-info → acryl_datahub-1.0.0.3rc6.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
acryl_datahub-1.0.0.
|
|
1
|
+
acryl_datahub-1.0.0.3rc6.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=VrjEJq0-eU07ihy36V-x_6VzO_ae3ZtXi7aMCbdTSZw,323
|
|
5
5
|
datahub/entrypoints.py,sha256=2TYgHhs3sCxJlojIHjqfxzt3_ImPwPzq4vBtsUuMqu4,8885
|
|
6
6
|
datahub/errors.py,sha256=BzKdcmYseHOt36zfjJXc17WNutFhp9Y23cU_L6cIkxc,612
|
|
7
7
|
datahub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -350,7 +350,7 @@ datahub/ingestion/source/kafka_connect/sink_connectors.py,sha256=kEnxOXTik5HSDLj
|
|
|
350
350
|
datahub/ingestion/source/kafka_connect/source_connectors.py,sha256=OQ0vjz9xF0T30pRln_gDvelmaOE5jTAxwsCtm1K4SWM,21080
|
|
351
351
|
datahub/ingestion/source/looker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
352
352
|
datahub/ingestion/source/looker/lkml_patched.py,sha256=XShEU7Wbz0DubDhYMjKf9wjKZrBJa2XPg9MIjp8rPhk,733
|
|
353
|
-
datahub/ingestion/source/looker/looker_common.py,sha256=
|
|
353
|
+
datahub/ingestion/source/looker/looker_common.py,sha256=h1DLGyPCYbFM2QUjgJ8ZK_LDLzu-Q7F5X4VIRZMLweg,62817
|
|
354
354
|
datahub/ingestion/source/looker/looker_config.py,sha256=eVKw1nn9D8hUFdRfNyT3MtzL8w-zWhFeokiwSnNKQuc,13607
|
|
355
355
|
datahub/ingestion/source/looker/looker_connection.py,sha256=yDmC6lDsHmL2e_Pw8ULylwOIHPWPp_6gT1iyLvD0fTw,2075
|
|
356
356
|
datahub/ingestion/source/looker/looker_constant.py,sha256=GMKYtNXlpojPxa9azridKfcGLSJwKdUCTesp7U8dIrQ,402
|
|
@@ -359,7 +359,7 @@ datahub/ingestion/source/looker/looker_file_loader.py,sha256=gb2Z97_w28MsybYe01J
|
|
|
359
359
|
datahub/ingestion/source/looker/looker_lib_wrapper.py,sha256=2aEorQ3WjBzYVQIm-5QR2qDGAhpKflstwO5X9oboXS8,11553
|
|
360
360
|
datahub/ingestion/source/looker/looker_liquid_tag.py,sha256=mO4G4MNA4YZFvZaDBpdiJ2vP3irC82kY34RdaK4Pbfs,3100
|
|
361
361
|
datahub/ingestion/source/looker/looker_query_model.py,sha256=N0jBbFruiCIIGT6sJn6tNeppeQ78KGTkOwTLirhxFNc,2144
|
|
362
|
-
datahub/ingestion/source/looker/looker_source.py,sha256=
|
|
362
|
+
datahub/ingestion/source/looker/looker_source.py,sha256=TOOht_7c5PM77DhR-4hP7cPQZfvSuGU4F_xUeXDPfI8,67803
|
|
363
363
|
datahub/ingestion/source/looker/looker_template_language.py,sha256=5fZFPKFP3IYbJg3jLifjaji4wWg8wRy-1XDvc8Qucus,17949
|
|
364
364
|
datahub/ingestion/source/looker/looker_usage.py,sha256=qFBX7OHtIcarYIqFe0jQMrDV8MMPV_nN4PZrZRUznTw,23029
|
|
365
365
|
datahub/ingestion/source/looker/looker_view_id_cache.py,sha256=92gDy6NONhJYBp92z_IBzDVZvezmUIkaBCZY1bdk6mE,4392
|
|
@@ -1048,8 +1048,8 @@ datahub_provider/operators/datahub_assertion_operator.py,sha256=uvTQ-jk2F0sbqqxp
|
|
|
1048
1048
|
datahub_provider/operators/datahub_assertion_sensor.py,sha256=lCBj_3x1cf5GMNpHdfkpHuyHfVxsm6ff5x2Z5iizcAo,140
|
|
1049
1049
|
datahub_provider/operators/datahub_operation_operator.py,sha256=aevDp2FzX7FxGlXrR0khoHNbxbhKR2qPEX5e8O2Jyzw,174
|
|
1050
1050
|
datahub_provider/operators/datahub_operation_sensor.py,sha256=8fcdVBCEPgqy1etTXgLoiHoJrRt_nzFZQMdSzHqSG7M,168
|
|
1051
|
-
acryl_datahub-1.0.0.
|
|
1052
|
-
acryl_datahub-1.0.0.
|
|
1053
|
-
acryl_datahub-1.0.0.
|
|
1054
|
-
acryl_datahub-1.0.0.
|
|
1055
|
-
acryl_datahub-1.0.0.
|
|
1051
|
+
acryl_datahub-1.0.0.3rc6.dist-info/METADATA,sha256=ZOld7fZ4VTL1L7DczapOhGc9llaIYX4yscDrNUACf-g,176989
|
|
1052
|
+
acryl_datahub-1.0.0.3rc6.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
1053
|
+
acryl_datahub-1.0.0.3rc6.dist-info/entry_points.txt,sha256=o3mDeJXSKhsy7XLkuogihraiabBdLn9HaizYXPrxmk0,9710
|
|
1054
|
+
acryl_datahub-1.0.0.3rc6.dist-info/top_level.txt,sha256=iLjSrLK5ox1YVYcglRUkcvfZPvKlobBWx7CTUXx8_GI,25
|
|
1055
|
+
acryl_datahub-1.0.0.3rc6.dist-info/RECORD,,
|
datahub/_version.py
CHANGED
|
@@ -471,7 +471,10 @@ def get_view_file_path(
|
|
|
471
471
|
logger.debug("Entered")
|
|
472
472
|
|
|
473
473
|
for field in lkml_fields:
|
|
474
|
-
if
|
|
474
|
+
if (
|
|
475
|
+
LookerUtil.extract_view_name_from_lookml_model_explore_field(field)
|
|
476
|
+
== view_name
|
|
477
|
+
):
|
|
475
478
|
# This path is relative to git clone directory
|
|
476
479
|
logger.debug(f"Found view({view_name}) file-path {field.source_file}")
|
|
477
480
|
return field.source_file
|
|
@@ -1103,7 +1106,7 @@ class LookerExplore:
|
|
|
1103
1106
|
[column_ref] if column_ref is not None else []
|
|
1104
1107
|
)
|
|
1105
1108
|
|
|
1106
|
-
|
|
1109
|
+
looker_explore = cls(
|
|
1107
1110
|
name=explore_name,
|
|
1108
1111
|
model_name=model,
|
|
1109
1112
|
project_name=explore.project_name,
|
|
@@ -1121,6 +1124,8 @@ class LookerExplore:
|
|
|
1121
1124
|
source_file=explore.source_file,
|
|
1122
1125
|
tags=list(explore.tags) if explore.tags is not None else [],
|
|
1123
1126
|
)
|
|
1127
|
+
logger.debug(f"Created LookerExplore from API: {looker_explore}")
|
|
1128
|
+
return looker_explore
|
|
1124
1129
|
except SDKError as e:
|
|
1125
1130
|
if "<title>Looker Not Found (404)</title>" in str(e):
|
|
1126
1131
|
logger.info(
|
|
@@ -1161,6 +1166,9 @@ class LookerExplore:
|
|
|
1161
1166
|
dataset_name = config.explore_naming_pattern.replace_variables(
|
|
1162
1167
|
self.get_mapping(config)
|
|
1163
1168
|
)
|
|
1169
|
+
logger.debug(
|
|
1170
|
+
f"Generated dataset_name={dataset_name} for explore with model_name={self.model_name}, name={self.name}"
|
|
1171
|
+
)
|
|
1164
1172
|
|
|
1165
1173
|
return builder.make_dataset_urn_with_platform_instance(
|
|
1166
1174
|
platform=config.platform_name,
|
|
@@ -1362,6 +1370,7 @@ class LookerExploreRegistry:
|
|
|
1362
1370
|
|
|
1363
1371
|
@lru_cache(maxsize=200)
|
|
1364
1372
|
def get_explore(self, model: str, explore: str) -> Optional[LookerExplore]:
|
|
1373
|
+
logger.debug(f"Retrieving explore: model={model}, explore={explore}")
|
|
1365
1374
|
looker_explore = LookerExplore.from_api(
|
|
1366
1375
|
model,
|
|
1367
1376
|
explore,
|
|
@@ -1369,6 +1378,12 @@ class LookerExploreRegistry:
|
|
|
1369
1378
|
self.report,
|
|
1370
1379
|
self.source_config,
|
|
1371
1380
|
)
|
|
1381
|
+
if looker_explore is not None:
|
|
1382
|
+
logger.debug(
|
|
1383
|
+
f"Found explore with model_name={looker_explore.model_name}, name={looker_explore.name}"
|
|
1384
|
+
)
|
|
1385
|
+
else:
|
|
1386
|
+
logger.debug(f"No explore found for model={model}, explore={explore}")
|
|
1372
1387
|
return looker_explore
|
|
1373
1388
|
|
|
1374
1389
|
def compute_stats(self) -> Dict:
|
|
@@ -279,6 +279,11 @@ class LookerDashboardSource(TestableSource, StatefulIngestionSourceBase):
|
|
|
279
279
|
return []
|
|
280
280
|
result = []
|
|
281
281
|
|
|
282
|
+
if query is not None:
|
|
283
|
+
logger.debug(
|
|
284
|
+
f"Processing query: model={query.model}, view={query.view}, input_fields_count={len(query.fields) if query.fields else 0}"
|
|
285
|
+
)
|
|
286
|
+
|
|
282
287
|
# query.dynamic_fields can contain:
|
|
283
288
|
# - looker table calculations: https://docs.looker.com/exploring-data/using-table-calculations
|
|
284
289
|
# - looker custom measures: https://docs.looker.com/de/exploring-data/adding-fields/custom-measure
|
|
@@ -399,9 +404,12 @@ class LookerDashboardSource(TestableSource, StatefulIngestionSourceBase):
|
|
|
399
404
|
# Get the explore from the view directly
|
|
400
405
|
explores = [element.query.view] if element.query.view is not None else []
|
|
401
406
|
logger.debug(
|
|
402
|
-
f"
|
|
407
|
+
f"Dashboard element {element.title} (ID: {element.id}): Upstream explores added via query={explores} with model={element.query.model}, explore={element.query.view}"
|
|
403
408
|
)
|
|
404
409
|
for exp in explores:
|
|
410
|
+
logger.debug(
|
|
411
|
+
f"Adding reachable explore: model={element.query.model}, explore={exp}, element_id={element.id}, title={element.title}"
|
|
412
|
+
)
|
|
405
413
|
self.add_reachable_explore(
|
|
406
414
|
model=element.query.model,
|
|
407
415
|
explore=exp,
|
|
@@ -477,12 +485,10 @@ class LookerDashboardSource(TestableSource, StatefulIngestionSourceBase):
|
|
|
477
485
|
|
|
478
486
|
# Failing the above two approaches, pick out details from result_maker
|
|
479
487
|
elif element.result_maker is not None:
|
|
480
|
-
model: str = ""
|
|
481
488
|
input_fields = []
|
|
482
489
|
|
|
483
490
|
explores = []
|
|
484
491
|
if element.result_maker.query is not None:
|
|
485
|
-
model = element.result_maker.query.model
|
|
486
492
|
if element.result_maker.query.view is not None:
|
|
487
493
|
explores.append(element.result_maker.query.view)
|
|
488
494
|
input_fields = self._get_input_fields_from_query(
|
|
@@ -502,9 +508,15 @@ class LookerDashboardSource(TestableSource, StatefulIngestionSourceBase):
|
|
|
502
508
|
|
|
503
509
|
# In addition to the query, filters can point to fields as well
|
|
504
510
|
assert element.result_maker.filterables is not None
|
|
511
|
+
|
|
512
|
+
# Different dashboard elements my reference explores from different models
|
|
513
|
+
# so we need to create a mapping of explore names to their models to maintain correct associations
|
|
514
|
+
explore_to_model_map = {}
|
|
515
|
+
|
|
505
516
|
for filterable in element.result_maker.filterables:
|
|
506
517
|
if filterable.view is not None and filterable.model is not None:
|
|
507
|
-
model
|
|
518
|
+
# Store the model for this view/explore in our mapping
|
|
519
|
+
explore_to_model_map[filterable.view] = filterable.model
|
|
508
520
|
explores.append(filterable.view)
|
|
509
521
|
self.add_reachable_explore(
|
|
510
522
|
model=filterable.model,
|
|
@@ -527,6 +539,18 @@ class LookerDashboardSource(TestableSource, StatefulIngestionSourceBase):
|
|
|
527
539
|
|
|
528
540
|
explores = sorted(list(set(explores))) # dedup the list of views
|
|
529
541
|
|
|
542
|
+
logger.debug(
|
|
543
|
+
f"Dashboard element {element.id} and their explores with the corresponding model: {explore_to_model_map}"
|
|
544
|
+
)
|
|
545
|
+
|
|
546
|
+
# If we have a query, use its model as the default for any explores that don't have a model in our mapping
|
|
547
|
+
default_model = ""
|
|
548
|
+
if (
|
|
549
|
+
element.result_maker.query is not None
|
|
550
|
+
and element.result_maker.query.model is not None
|
|
551
|
+
):
|
|
552
|
+
default_model = element.result_maker.query.model
|
|
553
|
+
|
|
530
554
|
return LookerDashboardElement(
|
|
531
555
|
id=element.id,
|
|
532
556
|
title=element.title if element.title is not None else "",
|
|
@@ -540,7 +564,11 @@ class LookerDashboardSource(TestableSource, StatefulIngestionSourceBase):
|
|
|
540
564
|
else ""
|
|
541
565
|
),
|
|
542
566
|
upstream_explores=[
|
|
543
|
-
LookerExplore(
|
|
567
|
+
LookerExplore(
|
|
568
|
+
model_name=explore_to_model_map.get(exp, default_model),
|
|
569
|
+
name=exp,
|
|
570
|
+
)
|
|
571
|
+
for exp in explores
|
|
544
572
|
],
|
|
545
573
|
input_fields=input_fields,
|
|
546
574
|
owner=None,
|
|
@@ -1270,6 +1298,7 @@ class LookerDashboardSource(TestableSource, StatefulIngestionSourceBase):
|
|
|
1270
1298
|
chart_urn = self._make_chart_urn(
|
|
1271
1299
|
element_id=dashboard_element.get_urn_element_id()
|
|
1272
1300
|
)
|
|
1301
|
+
|
|
1273
1302
|
input_fields_aspect = InputFieldsClass(
|
|
1274
1303
|
fields=self._input_fields_from_dashboard_element(dashboard_element)
|
|
1275
1304
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|