acryl-datahub 1.0.0.2rc4__py3-none-any.whl → 1.0.0.3__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.2rc4.dist-info → acryl_datahub-1.0.0.3.dist-info}/METADATA +2566 -2514
- {acryl_datahub-1.0.0.2rc4.dist-info → acryl_datahub-1.0.0.3.dist-info}/RECORD +159 -149
- {acryl_datahub-1.0.0.2rc4.dist-info → acryl_datahub-1.0.0.3.dist-info}/WHEEL +1 -1
- datahub/_version.py +1 -1
- datahub/api/circuit_breaker/operation_circuit_breaker.py +2 -2
- datahub/api/entities/datacontract/datacontract.py +35 -3
- datahub/api/entities/datajob/dataflow.py +3 -3
- datahub/api/entities/datajob/datajob.py +7 -4
- datahub/api/entities/dataset/dataset.py +9 -11
- datahub/api/entities/forms/forms.py +34 -34
- datahub/api/graphql/assertion.py +1 -1
- datahub/api/graphql/operation.py +4 -4
- datahub/cli/check_cli.py +3 -2
- datahub/cli/config_utils.py +2 -2
- datahub/cli/delete_cli.py +6 -5
- datahub/cli/docker_cli.py +2 -2
- datahub/cli/exists_cli.py +2 -1
- datahub/cli/get_cli.py +2 -1
- datahub/cli/iceberg_cli.py +6 -5
- datahub/cli/ingest_cli.py +9 -6
- datahub/cli/migrate.py +4 -3
- datahub/cli/migration_utils.py +4 -3
- datahub/cli/put_cli.py +3 -2
- datahub/cli/specific/assertions_cli.py +2 -1
- datahub/cli/specific/datacontract_cli.py +3 -2
- datahub/cli/specific/dataproduct_cli.py +10 -9
- datahub/cli/specific/dataset_cli.py +4 -3
- datahub/cli/specific/forms_cli.py +2 -1
- datahub/cli/specific/group_cli.py +2 -1
- datahub/cli/specific/structuredproperties_cli.py +4 -3
- datahub/cli/specific/user_cli.py +2 -1
- datahub/cli/state_cli.py +2 -1
- datahub/cli/timeline_cli.py +2 -1
- datahub/configuration/common.py +5 -0
- datahub/configuration/source_common.py +1 -1
- datahub/emitter/mcp.py +20 -5
- datahub/emitter/request_helper.py +116 -3
- datahub/emitter/rest_emitter.py +163 -93
- datahub/entrypoints.py +2 -1
- datahub/errors.py +4 -0
- datahub/ingestion/api/auto_work_units/auto_ensure_aspect_size.py +2 -1
- datahub/ingestion/api/source.py +2 -5
- datahub/ingestion/api/source_helpers.py +1 -0
- datahub/ingestion/glossary/classification_mixin.py +4 -2
- datahub/ingestion/graph/client.py +33 -8
- datahub/ingestion/graph/config.py +14 -0
- datahub/ingestion/graph/filters.py +1 -1
- datahub/ingestion/graph/links.py +53 -0
- datahub/ingestion/run/pipeline.py +9 -6
- datahub/ingestion/run/pipeline_config.py +1 -1
- datahub/ingestion/sink/datahub_rest.py +5 -6
- datahub/ingestion/source/apply/datahub_apply.py +2 -1
- datahub/ingestion/source/aws/sagemaker_processors/feature_groups.py +1 -1
- datahub/ingestion/source/bigquery_v2/bigquery.py +24 -23
- datahub/ingestion/source/bigquery_v2/bigquery_config.py +4 -62
- datahub/ingestion/source/bigquery_v2/bigquery_connection.py +70 -0
- datahub/ingestion/source/bigquery_v2/bigquery_queries.py +3 -1
- datahub/ingestion/source/cassandra/cassandra_profiling.py +25 -24
- datahub/ingestion/source/common/subtypes.py +3 -0
- datahub/ingestion/source/datahub/datahub_database_reader.py +12 -11
- datahub/ingestion/source/dbt/dbt_cloud.py +2 -6
- datahub/ingestion/source/dbt/dbt_common.py +10 -2
- datahub/ingestion/source/dbt/dbt_core.py +82 -42
- datahub/ingestion/source/dynamodb/dynamodb.py +7 -4
- datahub/ingestion/source/feast.py +4 -4
- datahub/ingestion/source/fivetran/config.py +1 -1
- datahub/ingestion/source/fivetran/fivetran_log_api.py +7 -3
- datahub/ingestion/source/fivetran/fivetran_query.py +16 -16
- datahub/ingestion/source/ge_data_profiler.py +27 -1
- datahub/ingestion/source/hex/api.py +1 -20
- datahub/ingestion/source/hex/query_fetcher.py +4 -1
- datahub/ingestion/source/iceberg/iceberg.py +20 -4
- datahub/ingestion/source/iceberg/iceberg_common.py +2 -2
- datahub/ingestion/source/ldap.py +1 -1
- datahub/ingestion/source/looker/looker_common.py +17 -2
- datahub/ingestion/source/looker/looker_lib_wrapper.py +1 -1
- datahub/ingestion/source/looker/looker_source.py +34 -5
- datahub/ingestion/source/looker/lookml_source.py +7 -1
- datahub/ingestion/source/metadata/lineage.py +2 -1
- datahub/ingestion/source/mlflow.py +19 -6
- datahub/ingestion/source/mode.py +74 -28
- datahub/ingestion/source/neo4j/neo4j_source.py +85 -55
- datahub/ingestion/source/powerbi/config.py +13 -1
- datahub/ingestion/source/powerbi/m_query/data_classes.py +1 -0
- datahub/ingestion/source/powerbi/m_query/odbc.py +185 -0
- datahub/ingestion/source/powerbi/m_query/pattern_handler.py +153 -0
- datahub/ingestion/source/powerbi/rest_api_wrapper/data_resolver.py +2 -2
- datahub/ingestion/source/redshift/usage.py +10 -9
- datahub/ingestion/source/sigma/config.py +74 -6
- datahub/ingestion/source/sigma/sigma.py +16 -1
- datahub/ingestion/source/sigma/sigma_api.py +99 -58
- datahub/ingestion/source/slack/slack.py +4 -52
- datahub/ingestion/source/snowflake/snowflake_config.py +2 -12
- datahub/ingestion/source/snowflake/snowflake_connection.py +24 -18
- datahub/ingestion/source/snowflake/snowflake_profiler.py +1 -6
- datahub/ingestion/source/snowflake/snowflake_queries.py +18 -4
- datahub/ingestion/source/snowflake/snowflake_query.py +9 -63
- datahub/ingestion/source/snowflake/snowflake_tag.py +4 -1
- datahub/ingestion/source/sql/athena.py +2 -1
- datahub/ingestion/source/sql/clickhouse.py +5 -1
- datahub/ingestion/source/sql/druid.py +7 -2
- datahub/ingestion/source/sql/hive.py +7 -2
- datahub/ingestion/source/sql/hive_metastore.py +5 -5
- datahub/ingestion/source/sql/mssql/source.py +1 -1
- datahub/ingestion/source/sql/oracle.py +6 -2
- datahub/ingestion/source/sql/sql_config.py +1 -34
- datahub/ingestion/source/sql/sqlalchemy_uri.py +36 -0
- datahub/ingestion/source/sql/stored_procedures/base.py +12 -1
- datahub/ingestion/source/sql/two_tier_sql_source.py +1 -1
- datahub/ingestion/source/state_provider/datahub_ingestion_checkpointing_provider.py +2 -1
- datahub/ingestion/source/tableau/tableau.py +31 -6
- datahub/ingestion/source/tableau/tableau_validation.py +1 -1
- datahub/ingestion/source/unity/config.py +2 -1
- datahub/ingestion/source/usage/clickhouse_usage.py +7 -3
- datahub/ingestion/source/usage/starburst_trino_usage.py +5 -3
- datahub/ingestion/source/vertexai/vertexai.py +316 -4
- datahub/ingestion/source/vertexai/vertexai_result_type_utils.py +23 -2
- datahub/integrations/assertion/common.py +3 -2
- datahub/metadata/{_schema_classes.py → _internal_schema_classes.py} +538 -493
- datahub/metadata/_urns/urn_defs.py +1819 -1763
- datahub/metadata/com/linkedin/pegasus2avro/metadata/key/__init__.py +2 -0
- datahub/metadata/schema.avsc +17296 -16883
- datahub/metadata/schema_classes.py +3 -3
- datahub/metadata/schemas/DataContractKey.avsc +2 -1
- datahub/metadata/schemas/DataHubOpenAPISchemaKey.avsc +22 -0
- datahub/metadata/schemas/DataTransformLogic.avsc +4 -2
- datahub/metadata/schemas/FormInfo.avsc +5 -0
- datahub/metadata/schemas/MLModelDeploymentProperties.avsc +3 -0
- datahub/metadata/schemas/MetadataChangeEvent.avsc +6 -0
- datahub/metadata/schemas/MetadataChangeLog.avsc +3 -0
- datahub/metadata/schemas/MetadataChangeProposal.avsc +3 -0
- datahub/metadata/schemas/QueryProperties.avsc +4 -2
- datahub/metadata/schemas/SystemMetadata.avsc +86 -0
- datahub/metadata/schemas/__init__.py +3 -3
- datahub/sdk/_all_entities.py +4 -0
- datahub/sdk/_shared.py +142 -4
- datahub/sdk/_utils.py +4 -0
- datahub/sdk/dataset.py +2 -2
- datahub/sdk/entity_client.py +8 -0
- datahub/sdk/lineage_client.py +235 -0
- datahub/sdk/main_client.py +6 -3
- datahub/sdk/mlmodel.py +301 -0
- datahub/sdk/mlmodelgroup.py +233 -0
- datahub/secret/datahub_secret_store.py +2 -1
- datahub/specific/dataset.py +12 -0
- datahub/sql_parsing/fingerprint_utils.py +6 -0
- datahub/sql_parsing/sql_parsing_aggregator.py +48 -34
- datahub/sql_parsing/sqlglot_utils.py +18 -14
- datahub/telemetry/telemetry.py +2 -2
- datahub/testing/check_imports.py +1 -1
- datahub/testing/mcp_diff.py +15 -2
- datahub/upgrade/upgrade.py +10 -12
- datahub/utilities/logging_manager.py +8 -1
- datahub/utilities/server_config_util.py +350 -10
- datahub/utilities/sqlalchemy_query_combiner.py +4 -5
- datahub/utilities/urn_encoder.py +1 -1
- {acryl_datahub-1.0.0.2rc4.dist-info → acryl_datahub-1.0.0.3.dist-info}/entry_points.txt +0 -0
- {acryl_datahub-1.0.0.2rc4.dist-info → acryl_datahub-1.0.0.3.dist-info}/licenses/LICENSE +0 -0
- {acryl_datahub-1.0.0.2rc4.dist-info → acryl_datahub-1.0.0.3.dist-info}/top_level.txt +0 -0
|
@@ -637,8 +637,13 @@ def get_view_definition_patched(self, connection, view_name, schema=None, **kw):
|
|
|
637
637
|
self.identifier_preparer.quote_identifier(schema),
|
|
638
638
|
self.identifier_preparer.quote_identifier(view_name),
|
|
639
639
|
)
|
|
640
|
-
|
|
641
|
-
|
|
640
|
+
# Hive responds to the SHOW CREATE TABLE with the full view DDL,
|
|
641
|
+
# including the view definition. However, for multiline view definitions,
|
|
642
|
+
# it returns multiple rows (of one column each), each with a part of the definition.
|
|
643
|
+
# Any whitespace at the beginning/end of each view definition line is lost.
|
|
644
|
+
rows = connection.execute(f"SHOW CREATE TABLE {full_table}").fetchall()
|
|
645
|
+
parts = [row[0] for row in rows]
|
|
646
|
+
return "\n".join(parts)
|
|
642
647
|
|
|
643
648
|
|
|
644
649
|
HiveDialect.get_view_names = get_view_names_patched
|
|
@@ -36,7 +36,6 @@ from datahub.ingestion.source.sql.sql_common import (
|
|
|
36
36
|
from datahub.ingestion.source.sql.sql_config import (
|
|
37
37
|
BasicSQLAlchemyConfig,
|
|
38
38
|
SQLCommonConfig,
|
|
39
|
-
make_sqlalchemy_uri,
|
|
40
39
|
)
|
|
41
40
|
from datahub.ingestion.source.sql.sql_utils import (
|
|
42
41
|
add_table_to_schema_container,
|
|
@@ -46,6 +45,7 @@ from datahub.ingestion.source.sql.sql_utils import (
|
|
|
46
45
|
gen_schema_key,
|
|
47
46
|
get_domain_wu,
|
|
48
47
|
)
|
|
48
|
+
from datahub.ingestion.source.sql.sqlalchemy_uri import make_sqlalchemy_uri
|
|
49
49
|
from datahub.ingestion.source.state.stateful_ingestion_base import JobId
|
|
50
50
|
from datahub.metadata.com.linkedin.pegasus2avro.common import StatusClass
|
|
51
51
|
from datahub.metadata.com.linkedin.pegasus2avro.metadata.snapshot import DatasetSnapshot
|
|
@@ -67,10 +67,10 @@ TableKey = namedtuple("TableKey", ["schema", "table"])
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
class HiveMetastoreConfigMode(StrEnum):
|
|
70
|
-
hive
|
|
71
|
-
presto
|
|
72
|
-
presto_on_hive
|
|
73
|
-
trino
|
|
70
|
+
hive = "hive"
|
|
71
|
+
presto = "presto"
|
|
72
|
+
presto_on_hive = "presto-on-hive"
|
|
73
|
+
trino = "trino"
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
@dataclass
|
|
@@ -44,9 +44,9 @@ from datahub.ingestion.source.sql.sql_common import (
|
|
|
44
44
|
)
|
|
45
45
|
from datahub.ingestion.source.sql.sql_config import (
|
|
46
46
|
BasicSQLAlchemyConfig,
|
|
47
|
-
make_sqlalchemy_uri,
|
|
48
47
|
)
|
|
49
48
|
from datahub.ingestion.source.sql.sql_report import SQLSourceReport
|
|
49
|
+
from datahub.ingestion.source.sql.sqlalchemy_uri import make_sqlalchemy_uri
|
|
50
50
|
from datahub.ingestion.source.sql.stored_procedures.base import (
|
|
51
51
|
generate_procedure_lineage,
|
|
52
52
|
)
|
|
@@ -127,11 +127,15 @@ class OracleConfig(BasicSQLAlchemyConfig):
|
|
|
127
127
|
)
|
|
128
128
|
return v
|
|
129
129
|
|
|
130
|
-
def get_sql_alchemy_url(
|
|
131
|
-
|
|
130
|
+
def get_sql_alchemy_url(
|
|
131
|
+
self, uri_opts: Optional[Dict[str, Any]] = None, database: Optional[str] = None
|
|
132
|
+
) -> str:
|
|
133
|
+
url = super().get_sql_alchemy_url(uri_opts=uri_opts, database=database)
|
|
134
|
+
|
|
132
135
|
if self.service_name:
|
|
133
136
|
assert not self.database
|
|
134
137
|
url = f"{url}/?service_name={self.service_name}"
|
|
138
|
+
|
|
135
139
|
return url
|
|
136
140
|
|
|
137
141
|
def get_identifier(self, schema: str, table: str) -> str:
|
|
@@ -4,7 +4,6 @@ from typing import Any, Dict, Optional
|
|
|
4
4
|
|
|
5
5
|
import pydantic
|
|
6
6
|
from pydantic import Field
|
|
7
|
-
from sqlalchemy.engine import URL
|
|
8
7
|
|
|
9
8
|
from datahub.configuration.common import AllowDenyPattern, ConfigModel
|
|
10
9
|
from datahub.configuration.source_common import (
|
|
@@ -20,6 +19,7 @@ from datahub.ingestion.glossary.classification_mixin import (
|
|
|
20
19
|
ClassificationSourceConfigMixin,
|
|
21
20
|
)
|
|
22
21
|
from datahub.ingestion.source.ge_profiling_config import GEProfilingConfig
|
|
22
|
+
from datahub.ingestion.source.sql.sqlalchemy_uri import make_sqlalchemy_uri
|
|
23
23
|
from datahub.ingestion.source.state.stale_entity_removal_handler import (
|
|
24
24
|
StatefulStaleMetadataRemovalConfig,
|
|
25
25
|
)
|
|
@@ -184,36 +184,3 @@ class SQLAlchemyConnectionConfig(ConfigModel):
|
|
|
184
184
|
|
|
185
185
|
class BasicSQLAlchemyConfig(SQLAlchemyConnectionConfig, SQLCommonConfig):
|
|
186
186
|
pass
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
def make_sqlalchemy_uri(
|
|
190
|
-
scheme: str,
|
|
191
|
-
username: Optional[str],
|
|
192
|
-
password: Optional[str],
|
|
193
|
-
at: Optional[str],
|
|
194
|
-
db: Optional[str],
|
|
195
|
-
uri_opts: Optional[Dict[str, Any]] = None,
|
|
196
|
-
) -> str:
|
|
197
|
-
host: Optional[str] = None
|
|
198
|
-
port: Optional[int] = None
|
|
199
|
-
if at:
|
|
200
|
-
try:
|
|
201
|
-
host, port_str = at.rsplit(":", 1)
|
|
202
|
-
port = int(port_str)
|
|
203
|
-
except ValueError:
|
|
204
|
-
host = at
|
|
205
|
-
port = None
|
|
206
|
-
if uri_opts:
|
|
207
|
-
uri_opts = {k: v for k, v in uri_opts.items() if v is not None}
|
|
208
|
-
|
|
209
|
-
return str(
|
|
210
|
-
URL.create(
|
|
211
|
-
drivername=scheme,
|
|
212
|
-
username=username,
|
|
213
|
-
password=password,
|
|
214
|
-
host=host,
|
|
215
|
-
port=port,
|
|
216
|
-
database=db,
|
|
217
|
-
query=uri_opts or {},
|
|
218
|
-
)
|
|
219
|
-
)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from typing import Any, Dict, Optional
|
|
2
|
+
|
|
3
|
+
from sqlalchemy.engine import URL
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def make_sqlalchemy_uri(
|
|
7
|
+
scheme: str,
|
|
8
|
+
username: Optional[str],
|
|
9
|
+
password: Optional[str],
|
|
10
|
+
at: Optional[str],
|
|
11
|
+
db: Optional[str],
|
|
12
|
+
uri_opts: Optional[Dict[str, Any]] = None,
|
|
13
|
+
) -> str:
|
|
14
|
+
host: Optional[str] = None
|
|
15
|
+
port: Optional[int] = None
|
|
16
|
+
if at:
|
|
17
|
+
try:
|
|
18
|
+
host, port_str = at.rsplit(":", 1)
|
|
19
|
+
port = int(port_str)
|
|
20
|
+
except ValueError:
|
|
21
|
+
host = at
|
|
22
|
+
port = None
|
|
23
|
+
if uri_opts:
|
|
24
|
+
uri_opts = {k: v for k, v in uri_opts.items() if v is not None}
|
|
25
|
+
|
|
26
|
+
return str(
|
|
27
|
+
URL.create(
|
|
28
|
+
drivername=scheme,
|
|
29
|
+
username=username,
|
|
30
|
+
password=password,
|
|
31
|
+
host=host,
|
|
32
|
+
port=port,
|
|
33
|
+
database=db,
|
|
34
|
+
query=uri_opts or {},
|
|
35
|
+
)
|
|
36
|
+
)
|
|
@@ -26,6 +26,7 @@ from datahub.metadata.schema_classes import (
|
|
|
26
26
|
DataPlatformInstanceClass,
|
|
27
27
|
DataTransformClass,
|
|
28
28
|
DataTransformLogicClass,
|
|
29
|
+
QueryLanguageClass,
|
|
29
30
|
QueryStatementClass,
|
|
30
31
|
SubTypesClass,
|
|
31
32
|
)
|
|
@@ -176,7 +177,17 @@ def _generate_job_workunits(
|
|
|
176
177
|
DataTransformClass(
|
|
177
178
|
queryStatement=QueryStatementClass(
|
|
178
179
|
value=procedure.procedure_definition,
|
|
179
|
-
language=
|
|
180
|
+
language=(
|
|
181
|
+
QueryLanguageClass.SQL
|
|
182
|
+
if procedure.language == "SQL"
|
|
183
|
+
# The language field uses a pretty limited enum.
|
|
184
|
+
# The "UNKNOWN" enum value is pretty new, so we don't want to
|
|
185
|
+
# emit it until it has broader server-side support. As a
|
|
186
|
+
# short-term solution, we map all languages to "SQL".
|
|
187
|
+
# TODO: Once we've released server 1.1.0, we should change
|
|
188
|
+
# this to be "UNKNOWN" for all languages except "SQL".
|
|
189
|
+
else QueryLanguageClass.SQL
|
|
190
|
+
),
|
|
180
191
|
),
|
|
181
192
|
)
|
|
182
193
|
]
|
|
@@ -14,12 +14,12 @@ from datahub.ingestion.api.workunit import MetadataWorkUnit
|
|
|
14
14
|
from datahub.ingestion.source.sql.sql_common import SQLAlchemySource, logger
|
|
15
15
|
from datahub.ingestion.source.sql.sql_config import (
|
|
16
16
|
BasicSQLAlchemyConfig,
|
|
17
|
-
make_sqlalchemy_uri,
|
|
18
17
|
)
|
|
19
18
|
from datahub.ingestion.source.sql.sql_utils import (
|
|
20
19
|
add_table_to_schema_container,
|
|
21
20
|
gen_database_key,
|
|
22
21
|
)
|
|
22
|
+
from datahub.ingestion.source.sql.sqlalchemy_uri import make_sqlalchemy_uri
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class TwoTierSQLAlchemyConfig(BasicSQLAlchemyConfig):
|
|
@@ -10,7 +10,8 @@ from datahub.ingestion.api.ingestion_job_checkpointing_provider_base import (
|
|
|
10
10
|
IngestionCheckpointingProviderConfig,
|
|
11
11
|
JobId,
|
|
12
12
|
)
|
|
13
|
-
from datahub.ingestion.graph.client import
|
|
13
|
+
from datahub.ingestion.graph.client import DataHubGraph
|
|
14
|
+
from datahub.ingestion.graph.config import DatahubClientConfig
|
|
14
15
|
from datahub.metadata.schema_classes import DatahubIngestionCheckpointClass
|
|
15
16
|
|
|
16
17
|
logger = logging.getLogger(__name__)
|
|
@@ -12,6 +12,7 @@ from typing import (
|
|
|
12
12
|
Dict,
|
|
13
13
|
Iterable,
|
|
14
14
|
List,
|
|
15
|
+
Literal,
|
|
15
16
|
Optional,
|
|
16
17
|
Set,
|
|
17
18
|
Tuple,
|
|
@@ -612,10 +613,14 @@ class TableauConfig(
|
|
|
612
613
|
description="Configuration settings for ingesting Tableau groups and their capabilities as custom properties.",
|
|
613
614
|
)
|
|
614
615
|
|
|
615
|
-
ingest_hidden_assets: bool = Field(
|
|
616
|
-
|
|
617
|
-
description=
|
|
618
|
-
|
|
616
|
+
ingest_hidden_assets: Union[List[Literal["worksheet", "dashboard"]], bool] = Field(
|
|
617
|
+
default=["worksheet", "dashboard"],
|
|
618
|
+
description=(
|
|
619
|
+
"When enabled, hidden worksheets and dashboards are ingested into Datahub."
|
|
620
|
+
" If a dashboard or worksheet is hidden in Tableau the luid is blank."
|
|
621
|
+
" A list of asset types can also be specified, to only ingest those hidden assets."
|
|
622
|
+
" Current options supported are 'worksheet' and 'dashboard'."
|
|
623
|
+
),
|
|
619
624
|
)
|
|
620
625
|
|
|
621
626
|
tags_for_hidden_assets: List[str] = Field(
|
|
@@ -1348,6 +1353,26 @@ class TableauSiteSource:
|
|
|
1348
1353
|
# More info here: https://help.tableau.com/current/api/metadata_api/en-us/reference/view.doc.html
|
|
1349
1354
|
return not dashboard_or_view.get(c.LUID)
|
|
1350
1355
|
|
|
1356
|
+
def _should_ingest_worksheet(self, worksheet: Dict) -> bool:
|
|
1357
|
+
return (
|
|
1358
|
+
self.config.ingest_hidden_assets is True
|
|
1359
|
+
or (
|
|
1360
|
+
isinstance(self.config.ingest_hidden_assets, list)
|
|
1361
|
+
and "worksheet" in self.config.ingest_hidden_assets
|
|
1362
|
+
)
|
|
1363
|
+
or not self._is_hidden_view(worksheet)
|
|
1364
|
+
)
|
|
1365
|
+
|
|
1366
|
+
def _should_ingest_dashboard(self, dashboard: Dict) -> bool:
|
|
1367
|
+
return (
|
|
1368
|
+
self.config.ingest_hidden_assets is True
|
|
1369
|
+
or (
|
|
1370
|
+
isinstance(self.config.ingest_hidden_assets, list)
|
|
1371
|
+
and "dashboard" in self.config.ingest_hidden_assets
|
|
1372
|
+
)
|
|
1373
|
+
or not self._is_hidden_view(dashboard)
|
|
1374
|
+
)
|
|
1375
|
+
|
|
1351
1376
|
def get_connection_object_page(
|
|
1352
1377
|
self,
|
|
1353
1378
|
query: str,
|
|
@@ -3059,7 +3084,7 @@ class TableauSiteSource:
|
|
|
3059
3084
|
query_filter=sheets_filter,
|
|
3060
3085
|
page_size=self.config.effective_sheet_page_size,
|
|
3061
3086
|
):
|
|
3062
|
-
if self.
|
|
3087
|
+
if self._should_ingest_worksheet(sheet):
|
|
3063
3088
|
yield from self.emit_sheets_as_charts(sheet, sheet.get(c.WORKBOOK))
|
|
3064
3089
|
else:
|
|
3065
3090
|
self.report.num_hidden_assets_skipped += 1
|
|
@@ -3380,7 +3405,7 @@ class TableauSiteSource:
|
|
|
3380
3405
|
query_filter=dashboards_filter,
|
|
3381
3406
|
page_size=self.config.effective_dashboard_page_size,
|
|
3382
3407
|
):
|
|
3383
|
-
if self.
|
|
3408
|
+
if self._should_ingest_dashboard(dashboard):
|
|
3384
3409
|
yield from self.emit_dashboard(dashboard, dashboard.get(c.WORKBOOK))
|
|
3385
3410
|
else:
|
|
3386
3411
|
self.report.num_hidden_assets_skipped += 1
|
|
@@ -24,7 +24,7 @@ def check_user_role(
|
|
|
24
24
|
mitigation_message_prefix: str = (
|
|
25
25
|
"Assign `Site Administrator Explorer` role to the user"
|
|
26
26
|
)
|
|
27
|
-
mitigation_message_suffix: str = "Refer to the setup guide: https://
|
|
27
|
+
mitigation_message_suffix: str = "Refer to the setup guide: https://docs.datahub.com/docs/quick-ingestion-guides/tableau/setup"
|
|
28
28
|
|
|
29
29
|
try:
|
|
30
30
|
# TODO: Add check for `Enable Derived Permissions`
|
|
@@ -17,7 +17,8 @@ from datahub.configuration.validate_field_removal import pydantic_removed_field
|
|
|
17
17
|
from datahub.configuration.validate_field_rename import pydantic_renamed_field
|
|
18
18
|
from datahub.ingestion.source.ge_data_profiler import DATABRICKS
|
|
19
19
|
from datahub.ingestion.source.ge_profiling_config import GEProfilingConfig
|
|
20
|
-
from datahub.ingestion.source.sql.sql_config import SQLCommonConfig
|
|
20
|
+
from datahub.ingestion.source.sql.sql_config import SQLCommonConfig
|
|
21
|
+
from datahub.ingestion.source.sql.sqlalchemy_uri import make_sqlalchemy_uri
|
|
21
22
|
from datahub.ingestion.source.state.stale_entity_removal_handler import (
|
|
22
23
|
StatefulStaleMetadataRemovalConfig,
|
|
23
24
|
)
|
|
@@ -2,7 +2,7 @@ import collections
|
|
|
2
2
|
import dataclasses
|
|
3
3
|
import logging
|
|
4
4
|
from datetime import datetime
|
|
5
|
-
from typing import Dict, Iterable, List
|
|
5
|
+
from typing import Any, Dict, Iterable, List, Optional
|
|
6
6
|
|
|
7
7
|
from dateutil import parser
|
|
8
8
|
from pydantic.fields import Field
|
|
@@ -74,8 +74,12 @@ class ClickHouseUsageConfig(ClickHouseConfig, BaseUsageConfig, EnvConfigMixin):
|
|
|
74
74
|
options: dict = Field(default={}, description="")
|
|
75
75
|
query_log_table: str = Field(default="system.query_log", exclude=True)
|
|
76
76
|
|
|
77
|
-
def get_sql_alchemy_url(
|
|
78
|
-
|
|
77
|
+
def get_sql_alchemy_url(
|
|
78
|
+
self,
|
|
79
|
+
uri_opts: Optional[Dict[str, Any]] = None,
|
|
80
|
+
current_db: Optional[str] = None,
|
|
81
|
+
) -> str:
|
|
82
|
+
return super().get_sql_alchemy_url(uri_opts=uri_opts, current_db=current_db)
|
|
79
83
|
|
|
80
84
|
|
|
81
85
|
@platform_name("ClickHouse")
|
|
@@ -4,7 +4,7 @@ import json
|
|
|
4
4
|
import logging
|
|
5
5
|
from datetime import datetime
|
|
6
6
|
from email.utils import parseaddr
|
|
7
|
-
from typing import Dict, Iterable, List, Optional
|
|
7
|
+
from typing import Any, Dict, Iterable, List, Optional
|
|
8
8
|
|
|
9
9
|
from dateutil import parser
|
|
10
10
|
from pydantic.fields import Field
|
|
@@ -98,8 +98,10 @@ class TrinoUsageConfig(TrinoConfig, BaseUsageConfig, EnvBasedSourceBaseConfig):
|
|
|
98
98
|
options: dict = Field(default={}, description="")
|
|
99
99
|
database: str = Field(description="The name of the catalog from getting the usage")
|
|
100
100
|
|
|
101
|
-
def get_sql_alchemy_url(
|
|
102
|
-
|
|
101
|
+
def get_sql_alchemy_url(
|
|
102
|
+
self, uri_opts: Optional[Dict[str, Any]] = None, database: Optional[str] = None
|
|
103
|
+
) -> str:
|
|
104
|
+
return super().get_sql_alchemy_url(uri_opts=uri_opts, database=database)
|
|
103
105
|
|
|
104
106
|
|
|
105
107
|
@dataclasses.dataclass
|