Skip to content

Commit

Permalink
Update dremio_source.py
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylJonny committed Oct 10, 2024
1 parent 646dd9a commit 58e0ba1
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def _build_source_map(self) -> Dict[str, DremioSourceMapping]:
),
re.IGNORECASE
):
source_platform_name = source_platform_name.lower()
source_map[source_platform_name] = mapping
source_map[source_platform_name].dremio_source_type = (
self.reference_source_mapping.get_category(
Expand Down Expand Up @@ -195,7 +196,7 @@ def _build_source_map(self) -> Dict[str, DremioSourceMapping]:
source_type
)

source_map[source_platform_name] = DremioSourceMapping(
source_map[source_platform_name.lower()] = DremioSourceMapping(
platform=source_type,
platform_name=source_name,
dremio_source_type=dremio_source_type,
Expand Down Expand Up @@ -585,7 +586,7 @@ def _map_dremio_dataset_to_urn(
Map a Dremio dataset to a DataHub URN.
"""

mapping = self.source_map.get(dremio_source)
mapping = self.source_map.get(dremio_source.lower())
if not mapping:
return None

Expand All @@ -603,14 +604,14 @@ def _map_dremio_dataset_to_urn(

if mapping.platform_instance:
return make_dataset_urn_with_platform_instance(
platform=mapping.platform,
platform=mapping.platform.lower(),
name=dremio_dataset,
platform_instance=mapping.platform_instance,
env=self.config.env
)

return make_dataset_urn_with_platform_instance(
platform=mapping.platform,
platform=mapping.platform.lower(),
name=dremio_dataset,
platform_instance=None,
env=self.config.env
Expand Down

0 comments on commit 58e0ba1

Please sign in to comment.