Skip to content

Commit b763f89

Browse files
committed
fix: correctly use dependent view info during final loop
the original implementation incorrectly referenced the last lineage_element instead of the loop key. Signed-off-by: Lucas Roesler <[email protected]>
1 parent 2e0fd86 commit b763f89

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

datahub_postgres_lineage/ingestion.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ def get_workunits(self) -> Iterable[MetadataWorkUnit]:
207207
lineage_elements: Dict[str, List[str]] = {}
208208
# Loop over the lineages in the JSON data.
209209
for lineage in data:
210-
211210
if not self.config.view_pattern.allowed(lineage.dependent_view):
212211
self.report.report_dropped(
213212
f"{lineage.dependent_schema}.{lineage.dependent_view}"
@@ -247,8 +246,8 @@ def get_workunits(self) -> Iterable[MetadataWorkUnit]:
247246
urn = mce_builder.make_dataset_urn(
248247
"postgres",
249248
self.config.get_identifier(
250-
lineage.dependent_schema,
251-
lineage.dependent_view,
249+
dependent_schema,
250+
dependent_view,
252251
),
253252
self.config.env,
254253
)

env/local/recipe.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ source:
99
username: ${PGUSER}
1010
password: ${PGPASSWORD}
1111

12-
view_pattern:
13-
deny:
14-
- "names"
12+
# view_pattern:
13+
# deny:
14+
# - "names"
1515

1616
sink:
1717
type: console

0 commit comments

Comments
 (0)