acryl-datahub 0.15.0.3__py3-none-any.whl → 0.15.0.4rc1__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.0.3.dist-info → acryl_datahub-0.15.0.4rc1.dist-info}/METADATA +2379 -2379
- {acryl_datahub-0.15.0.3.dist-info → acryl_datahub-0.15.0.4rc1.dist-info}/RECORD +20 -18
- datahub/__init__.py +1 -1
- datahub/cli/container_cli.py +89 -0
- datahub/entrypoints.py +2 -0
- datahub/ingestion/source/aws/s3_util.py +1 -24
- datahub/ingestion/source/bigquery_v2/bigquery_schema_gen.py +2 -2
- datahub/ingestion/source/dbt/dbt_common.py +2 -2
- datahub/ingestion/source/s3/source.py +6 -2
- datahub/ingestion/source/sql/hive_metastore.py +3 -3
- datahub/ingestion/source/sql/teradata.py +2 -2
- datahub/ingestion/source/tableau/tableau.py +23 -10
- datahub/metadata/_schema_classes.py +401 -401
- datahub/metadata/_urns/urn_defs.py +1395 -1395
- datahub/metadata/schema.avsc +16624 -16266
- datahub/sql_parsing/sql_parsing_aggregator.py +3 -3
- datahub/utilities/groupby.py +17 -0
- {acryl_datahub-0.15.0.3.dist-info → acryl_datahub-0.15.0.4rc1.dist-info}/WHEEL +0 -0
- {acryl_datahub-0.15.0.3.dist-info → acryl_datahub-0.15.0.4rc1.dist-info}/entry_points.txt +0 -0
- {acryl_datahub-0.15.0.3.dist-info → acryl_datahub-0.15.0.4rc1.dist-info}/top_level.txt +0 -0
|
@@ -2,7 +2,6 @@ import contextlib
|
|
|
2
2
|
import dataclasses
|
|
3
3
|
import enum
|
|
4
4
|
import functools
|
|
5
|
-
import itertools
|
|
6
5
|
import json
|
|
7
6
|
import logging
|
|
8
7
|
import os
|
|
@@ -63,6 +62,7 @@ from datahub.utilities.file_backed_collections import (
|
|
|
63
62
|
FileBackedDict,
|
|
64
63
|
FileBackedList,
|
|
65
64
|
)
|
|
65
|
+
from datahub.utilities.groupby import groupby_unsorted
|
|
66
66
|
from datahub.utilities.lossy_collections import LossyDict, LossyList
|
|
67
67
|
from datahub.utilities.ordered_set import OrderedSet
|
|
68
68
|
from datahub.utilities.perf_timer import PerfTimer
|
|
@@ -1314,8 +1314,8 @@ class SqlParsingAggregator(Closeable):
|
|
|
1314
1314
|
upstream_aspect.fineGrainedLineages = []
|
|
1315
1315
|
for downstream_column, all_upstream_columns in cll.items():
|
|
1316
1316
|
# Group by query ID.
|
|
1317
|
-
for query_id, upstream_columns_for_query in
|
|
1318
|
-
|
|
1317
|
+
for query_id, upstream_columns_for_query in groupby_unsorted(
|
|
1318
|
+
all_upstream_columns.items(),
|
|
1319
1319
|
key=lambda x: x[1],
|
|
1320
1320
|
):
|
|
1321
1321
|
upstream_columns = [x[0] for x in upstream_columns_for_query]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import collections
|
|
2
|
+
from typing import Callable, Iterable, Tuple, TypeVar
|
|
3
|
+
|
|
4
|
+
T = TypeVar("T")
|
|
5
|
+
K = TypeVar("K")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def groupby_unsorted(
|
|
9
|
+
iterable: Iterable[T], key: Callable[[T], K]
|
|
10
|
+
) -> Iterable[Tuple[K, Iterable[T]]]:
|
|
11
|
+
"""The default itertools.groupby() requires that the iterable is already sorted by the key.
|
|
12
|
+
This method is similar to groupby() but without the pre-sorted requirement."""
|
|
13
|
+
|
|
14
|
+
values = collections.defaultdict(list)
|
|
15
|
+
for v in iterable:
|
|
16
|
+
values[key(v)].append(v)
|
|
17
|
+
return values.items()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|