Skip to content

Commit

Permalink
fix failed rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
PeteMango committed Feb 28, 2025
1 parent f703e06 commit 49d7aac
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions metadata-ingestion/src/datahub/ingestion/source/superset.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
ChartTypeClass,
DashboardInfoClass,
DatasetLineageTypeClass,
DatasetLineageTypeClass,
DatasetPropertiesClass,
GlobalTagsClass,
OwnerClass,
Expand All @@ -79,10 +78,6 @@
TagAssociationClass,
UpstreamClass,
UpstreamLineageClass,
GlobalTagsClass,
TagAssociationClass,
UpstreamClass,
UpstreamLineageClass,
)
from datahub.utilities import config_clean
from datahub.utilities.registries.domain_registry import DomainRegistry
Expand Down Expand Up @@ -342,31 +337,24 @@ def get_datasource_urn_from_id(
# Druid do not have a database concept and has a limited schema concept, but they are nonetheless reported
# from superset. There is only one database per platform instance, and one schema named druid, so it would be
# redundant to systemically store them both in the URN.
if platform_instance in platform_without_databases:
if platform_instance in platform_without_databases:
database_name = None

if platform_instance == "druid" and schema_name == "druid":
if platform_instance == "druid" and schema_name == "druid":
# Follow DataHub's druid source convention.
schema_name = None

# If the information about the datasource is already contained in the dataset response,
# can just return the urn directly
if table_name and database_id:
# If the information about the datasource is already contained in the dataset response,
# can just return the urn directly
if table_name and database_id:
return make_dataset_urn(
platform=platform_instance,
platform=platform_instance,
name=".".join(
name for name in [database_name, schema_name, table_name] if name
),
env=self.config.env,
)


raise ValueError("Could not construct dataset URN")

def construct_dashboard_from_api_data(
Expand Down Expand Up @@ -639,7 +627,6 @@ def construct_dataset_from_dataset_data(
dataset_response = self.get_dataset_info(dataset_data.get("id"))
dataset = SupersetDataset(**dataset_response["result"])


datasource_urn = self.get_datasource_urn_from_id(
dataset_response, self.platform
)
Expand Down Expand Up @@ -687,17 +674,13 @@ def construct_dataset_from_dataset_data(
)
global_tags = GlobalTagsClass(tags=[TagAssociationClass(tag=tag_urn)])

global_tags = GlobalTagsClass(tags=[TagAssociationClass(tag=tag_urn)])

aspects_items: List[Any] = []
aspects_items.extend(
[
self.gen_schema_metadata(dataset_response),
dataset_info,
upstream_lineage,
global_tags,
upstream_lineage,
global_tags,
]
)

Expand Down

0 comments on commit 49d7aac

Please sign in to comment.