acryl-datahub 0.15.0.4rc1__py3-none-any.whl → 0.15.0.4rc3__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.4rc3.dist-info/LICENSE +202 -0
- {acryl_datahub-0.15.0.4rc1.dist-info → acryl_datahub-0.15.0.4rc3.dist-info}/METADATA +2404 -2401
- {acryl_datahub-0.15.0.4rc1.dist-info → acryl_datahub-0.15.0.4rc3.dist-info}/RECORD +24 -23
- datahub/__init__.py +1 -1
- datahub/cli/container_cli.py +30 -11
- datahub/emitter/enum_helpers.py +4 -2
- datahub/emitter/mce_builder.py +4 -0
- datahub/emitter/mcp_builder.py +19 -0
- datahub/ingestion/api/decorators.py +2 -0
- datahub/ingestion/api/registry.py +3 -1
- datahub/ingestion/api/sink.py +12 -0
- datahub/ingestion/api/source.py +5 -2
- datahub/ingestion/source/aws/glue.py +11 -5
- datahub/ingestion/source/powerbi/powerbi.py +4 -4
- datahub/ingestion/source/powerbi/rest_api_wrapper/data_classes.py +6 -6
- datahub/ingestion/source/powerbi/rest_api_wrapper/powerbi_api.py +24 -18
- datahub/ingestion/source/slack/slack.py +6 -0
- datahub/ingestion/source/sql/mssql/job_models.py +2 -2
- datahub/ingestion/source/sql/mssql/source.py +26 -11
- datahub/metadata/_urns/urn_defs.py +550 -101
- datahub/utilities/urns/_urn_base.py +6 -2
- {acryl_datahub-0.15.0.4rc1.dist-info → acryl_datahub-0.15.0.4rc3.dist-info}/WHEEL +0 -0
- {acryl_datahub-0.15.0.4rc1.dist-info → acryl_datahub-0.15.0.4rc3.dist-info}/entry_points.txt +0 -0
- {acryl_datahub-0.15.0.4rc1.dist-info → acryl_datahub-0.15.0.4rc3.dist-info}/top_level.txt +0 -0
|
@@ -11,6 +11,7 @@ from sqlalchemy.engine.base import Connection
|
|
|
11
11
|
from sqlalchemy.engine.reflection import Inspector
|
|
12
12
|
from sqlalchemy.exc import ProgrammingError, ResourceClosedError
|
|
13
13
|
|
|
14
|
+
import datahub.metadata.schema_classes as models
|
|
14
15
|
from datahub.configuration.common import AllowDenyPattern
|
|
15
16
|
from datahub.emitter.mcp import MetadataChangeProposalWrapper
|
|
16
17
|
from datahub.ingestion.api.common import PipelineContext
|
|
@@ -49,21 +50,15 @@ from datahub.ingestion.source.sql.sql_config import (
|
|
|
49
50
|
make_sqlalchemy_uri,
|
|
50
51
|
)
|
|
51
52
|
from datahub.ingestion.source.sql.sql_report import SQLSourceReport
|
|
52
|
-
from datahub.metadata.schema_classes import (
|
|
53
|
-
BooleanTypeClass,
|
|
54
|
-
NumberTypeClass,
|
|
55
|
-
StringTypeClass,
|
|
56
|
-
UnionTypeClass,
|
|
57
|
-
)
|
|
58
53
|
from datahub.utilities.file_backed_collections import FileBackedList
|
|
59
54
|
|
|
60
55
|
logger: logging.Logger = logging.getLogger(__name__)
|
|
61
56
|
|
|
62
|
-
register_custom_type(sqlalchemy.dialects.mssql.BIT, BooleanTypeClass)
|
|
63
|
-
register_custom_type(sqlalchemy.dialects.mssql.MONEY, NumberTypeClass)
|
|
64
|
-
register_custom_type(sqlalchemy.dialects.mssql.SMALLMONEY, NumberTypeClass)
|
|
65
|
-
register_custom_type(sqlalchemy.dialects.mssql.SQL_VARIANT, UnionTypeClass)
|
|
66
|
-
register_custom_type(sqlalchemy.dialects.mssql.UNIQUEIDENTIFIER, StringTypeClass)
|
|
57
|
+
register_custom_type(sqlalchemy.dialects.mssql.BIT, models.BooleanTypeClass)
|
|
58
|
+
register_custom_type(sqlalchemy.dialects.mssql.MONEY, models.NumberTypeClass)
|
|
59
|
+
register_custom_type(sqlalchemy.dialects.mssql.SMALLMONEY, models.NumberTypeClass)
|
|
60
|
+
register_custom_type(sqlalchemy.dialects.mssql.SQL_VARIANT, models.UnionTypeClass)
|
|
61
|
+
register_custom_type(sqlalchemy.dialects.mssql.UNIQUEIDENTIFIER, models.StringTypeClass)
|
|
67
62
|
|
|
68
63
|
|
|
69
64
|
class SQLServerConfig(BasicSQLAlchemyConfig):
|
|
@@ -651,6 +646,26 @@ class SQLServerSource(SQLAlchemySource):
|
|
|
651
646
|
entityUrn=data_job.urn,
|
|
652
647
|
aspect=data_job.as_datajob_input_output_aspect,
|
|
653
648
|
).as_workunit()
|
|
649
|
+
|
|
650
|
+
if (
|
|
651
|
+
self.config.include_stored_procedures_code
|
|
652
|
+
and isinstance(data_job.entity, StoredProcedure)
|
|
653
|
+
and data_job.entity.code is not None
|
|
654
|
+
):
|
|
655
|
+
yield MetadataChangeProposalWrapper(
|
|
656
|
+
entityUrn=data_job.urn,
|
|
657
|
+
aspect=models.DataTransformLogicClass(
|
|
658
|
+
transforms=[
|
|
659
|
+
models.DataTransformClass(
|
|
660
|
+
queryStatement=models.QueryStatementClass(
|
|
661
|
+
value=data_job.entity.code,
|
|
662
|
+
language=models.QueryLanguageClass.SQL,
|
|
663
|
+
),
|
|
664
|
+
)
|
|
665
|
+
]
|
|
666
|
+
),
|
|
667
|
+
).as_workunit()
|
|
668
|
+
|
|
654
669
|
# TODO: Add SubType when it appear
|
|
655
670
|
|
|
656
671
|
def construct_flow_workunits(
|