Skip to content

Commit

Permalink
Update hive.py
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylJonny committed Nov 13, 2024
1 parent 7d1b7a1 commit 52fb77b
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions metadata-ingestion/src/datahub/ingestion/source/sql/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ class HiveStorageLineageConfig:
"""Configuration for Hive storage lineage."""

def __init__(
self,
emit_storage_lineage: bool,
hive_storage_lineage_direction: str,
include_column_lineage: bool,
storage_platform_instance: Optional[str],
self,
emit_storage_lineage: bool,
hive_storage_lineage_direction: str,
include_column_lineage: bool,
storage_platform_instance: Optional[str],
):
if hive_storage_lineage_direction.lower() not in ["upstream", "downstream"]:
raise ValueError(
Expand Down Expand Up @@ -315,11 +315,7 @@ def _get_fine_grained_lineages(

# Find matching field in storage schema
matching_field = next(
(
f
for f in storage_schema.fields
if f.fieldPath == dataset_path
),
(f for f in storage_schema.fields if f.fieldPath == dataset_path),
None,
)

Expand Down Expand Up @@ -711,7 +707,7 @@ def get_storage_lineage_config(self) -> HiveStorageLineageConfig:
emit_storage_lineage=self.emit_storage_lineage,
hive_storage_lineage_direction=self.hive_storage_lineage_direction,
include_column_lineage=self.include_storage_column_lineage,
storage_platform_instance=self.storage_platform_instance
storage_platform_instance=self.storage_platform_instance,
)


Expand Down

0 comments on commit 52fb77b

Please sign in to comment.