acryl-datahub 0.15.0rc3__py3-none-any.whl → 0.15.0rc4__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-0.15.0rc3.dist-info → acryl_datahub-0.15.0rc4.dist-info}/METADATA +2461 -2461
- {acryl_datahub-0.15.0rc3.dist-info → acryl_datahub-0.15.0rc4.dist-info}/RECORD +15 -14
- {acryl_datahub-0.15.0rc3.dist-info → acryl_datahub-0.15.0rc4.dist-info}/entry_points.txt +1 -1
- datahub/__init__.py +1 -1
- datahub/ingestion/source/feast.py +97 -6
- datahub/ingestion/source/powerbi/__init__.py +0 -1
- datahub/ingestion/source/powerbi/config.py +3 -3
- datahub/ingestion/source/powerbi/m_query/data_classes.py +34 -2
- datahub/ingestion/source/powerbi/m_query/parser.py +6 -3
- datahub/ingestion/source/powerbi/m_query/pattern_handler.py +920 -0
- datahub/ingestion/source/powerbi/m_query/resolver.py +16 -938
- datahub/ingestion/source/powerbi/m_query/validator.py +9 -3
- datahub/ingestion/source/powerbi/powerbi.py +12 -6
- {acryl_datahub-0.15.0rc3.dist-info → acryl_datahub-0.15.0rc4.dist-info}/WHEEL +0 -0
- {acryl_datahub-0.15.0rc3.dist-info → acryl_datahub-0.15.0rc4.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from typing import Optional, Tuple
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import datahub.ingestion.source.powerbi.m_query.data_classes
|
|
5
5
|
|
|
6
6
|
logger = logging.getLogger(__name__)
|
|
7
7
|
|
|
@@ -14,12 +14,18 @@ def validate_parse_tree(
|
|
|
14
14
|
:param native_query_enabled: Whether user want to extract lineage from native query
|
|
15
15
|
:return: True or False.
|
|
16
16
|
"""
|
|
17
|
-
function_names = [
|
|
17
|
+
function_names = [
|
|
18
|
+
fun.value
|
|
19
|
+
for fun in datahub.ingestion.source.powerbi.m_query.data_classes.FunctionName
|
|
20
|
+
]
|
|
18
21
|
if not any(fun in expression for fun in function_names):
|
|
19
22
|
return False, "DataAccess function is not present in M-Query expression."
|
|
20
23
|
|
|
21
24
|
if native_query_enabled is False:
|
|
22
|
-
if
|
|
25
|
+
if (
|
|
26
|
+
datahub.ingestion.source.powerbi.m_query.data_classes.FunctionName.NATIVE_QUERY.value
|
|
27
|
+
in function_names
|
|
28
|
+
):
|
|
23
29
|
return (
|
|
24
30
|
False,
|
|
25
31
|
"Lineage extraction from native query is disabled. Enable native_query_parsing in recipe",
|
|
@@ -10,6 +10,7 @@ from typing import Iterable, List, Optional, Tuple, Union
|
|
|
10
10
|
import more_itertools
|
|
11
11
|
|
|
12
12
|
import datahub.emitter.mce_builder as builder
|
|
13
|
+
import datahub.ingestion.source.powerbi.m_query.data_classes
|
|
13
14
|
import datahub.ingestion.source.powerbi.rest_api_wrapper.data_classes as powerbi_data_classes
|
|
14
15
|
from datahub.emitter.mcp import MetadataChangeProposalWrapper
|
|
15
16
|
from datahub.emitter.mcp_builder import ContainerKey, gen_containers
|
|
@@ -42,12 +43,13 @@ from datahub.ingestion.source.powerbi.config import (
|
|
|
42
43
|
Constant,
|
|
43
44
|
PowerBiDashboardSourceConfig,
|
|
44
45
|
PowerBiDashboardSourceReport,
|
|
46
|
+
SupportedDataPlatform,
|
|
45
47
|
)
|
|
46
48
|
from datahub.ingestion.source.powerbi.dataplatform_instance_resolver import (
|
|
47
49
|
AbstractDataPlatformInstanceResolver,
|
|
48
50
|
create_dataplatform_instance_resolver,
|
|
49
51
|
)
|
|
50
|
-
from datahub.ingestion.source.powerbi.m_query import parser
|
|
52
|
+
from datahub.ingestion.source.powerbi.m_query import parser
|
|
51
53
|
from datahub.ingestion.source.powerbi.rest_api_wrapper.powerbi_api import PowerBiAPI
|
|
52
54
|
from datahub.ingestion.source.state.stale_entity_removal_handler import (
|
|
53
55
|
StaleEntityRemovalHandler,
|
|
@@ -182,7 +184,9 @@ class Mapper:
|
|
|
182
184
|
return [schema_mcp]
|
|
183
185
|
|
|
184
186
|
def make_fine_grained_lineage_class(
|
|
185
|
-
self,
|
|
187
|
+
self,
|
|
188
|
+
lineage: datahub.ingestion.source.powerbi.m_query.data_classes.Lineage,
|
|
189
|
+
dataset_urn: str,
|
|
186
190
|
) -> List[FineGrainedLineage]:
|
|
187
191
|
fine_grained_lineages: List[FineGrainedLineage] = []
|
|
188
192
|
|
|
@@ -234,7 +238,9 @@ class Mapper:
|
|
|
234
238
|
upstream: List[UpstreamClass] = []
|
|
235
239
|
cll_lineage: List[FineGrainedLineage] = []
|
|
236
240
|
|
|
237
|
-
upstream_lineage: List[
|
|
241
|
+
upstream_lineage: List[
|
|
242
|
+
datahub.ingestion.source.powerbi.m_query.data_classes.Lineage
|
|
243
|
+
] = parser.get_upstream_tables(
|
|
238
244
|
table=table,
|
|
239
245
|
reporter=self.__reporter,
|
|
240
246
|
platform_instance_resolver=self.__dataplatform_instance_resolver,
|
|
@@ -1294,7 +1300,7 @@ class PowerBiDashboardSource(StatefulIngestionSourceBase, TestableSource):
|
|
|
1294
1300
|
def validate_dataset_type_mapping(self):
|
|
1295
1301
|
powerbi_data_platforms: List[str] = [
|
|
1296
1302
|
data_platform.value.powerbi_data_platform_name
|
|
1297
|
-
for data_platform in
|
|
1303
|
+
for data_platform in SupportedDataPlatform
|
|
1298
1304
|
]
|
|
1299
1305
|
|
|
1300
1306
|
for key in self.source_config.dataset_type_mapping.keys():
|
|
@@ -1481,7 +1487,7 @@ class PowerBiDashboardSource(StatefulIngestionSourceBase, TestableSource):
|
|
|
1481
1487
|
|
|
1482
1488
|
def get_workunit_processors(self) -> List[Optional[MetadataWorkUnitProcessor]]:
|
|
1483
1489
|
# As modified_workspaces is not idempotent, hence workunit processors are run later for each workspace_id
|
|
1484
|
-
# This will result in creating checkpoint for each workspace_id
|
|
1490
|
+
# This will result in creating a checkpoint for each workspace_id
|
|
1485
1491
|
if self.source_config.modified_since:
|
|
1486
1492
|
return [] # Handle these in get_workunits_internal
|
|
1487
1493
|
else:
|
|
@@ -1492,7 +1498,7 @@ class PowerBiDashboardSource(StatefulIngestionSourceBase, TestableSource):
|
|
|
1492
1498
|
|
|
1493
1499
|
def get_workunits_internal(self) -> Iterable[MetadataWorkUnit]:
|
|
1494
1500
|
"""
|
|
1495
|
-
Datahub Ingestion framework
|
|
1501
|
+
Datahub Ingestion framework invokes this method
|
|
1496
1502
|
"""
|
|
1497
1503
|
logger.info("PowerBi plugin execution is started")
|
|
1498
1504
|
# Validate dataset type mapping
|
|
File without changes
|
|
File without changes
|