Skip to content

Commit

Permalink
chore: fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
purna2U authored Jun 29, 2023
1 parent bc6003b commit 94b6593
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions dbt_schema_builder/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,26 +97,26 @@ def find_in_current_sources(
for source in current_downstream_sources["sources"]:
if source["name"] == self.app:
for table in source["tables"]:
if table and table["name"] == self.source_relation_name:
if prefix:
# Handle prefix when no prefix has been applied already from prior runs
table["name"] = prefix + '_' + table["name"]
if table and prefix and table["name"] == self.source_relation_name:
# Handle prefix when no prefix has been applied already from prior runs
table["name"] = prefix + '_' + table["name"]
elif table and table["name"] == self.source_relation_name:
# No prefix already applied, no prefix to be applied
current_safe_downstream_source = table
elif prefix:
elif prefix and table and table["name"] == prefix + '_' + self.source_relation_name:
# Handle prefix when already applied from prior runs
if table and table["name"] == prefix + '_' + self.source_relation_name:
current_safe_downstream_source = table
current_safe_downstream_source = table
elif source["name"] == "{}_PII".format(self.app):
for table in source["tables"]:
if table and table["name"] == self.source_relation_name:
if prefix:
# Handle prefix for PII schema when no prefix has been applied already from prior runs
table["name"] = prefix + '_' + table["name"]
if table and prefix and table["name"] == self.source_relation_name:
# Handle prefix for PII schema when no prefix has been applied already from prior runs
table["name"] = prefix + '_' + table["name"]
elif table and table["name"] == self.source_relation_name:
# No prefix already applied, no prefix to be applied for PII schema
current_pii_downstream_source = table
elif prefix:
elif prefix and table and table["name"] == prefix + '_' + self.source_relation_name:
# Handle prefix for PII schema when already applied from prior runs
if table and table["name"] == prefix + '_' + self.source_relation_name:
current_pii_downstream_source = table
current_pii_downstream_source = table

if current_safe_downstream_source and current_pii_downstream_source:
break
Expand Down

0 comments on commit 94b6593

Please sign in to comment.