Skip to content

Commit

Permalink
Rename dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
Themiscodes committed Aug 13, 2024
1 parent 694f660 commit cf4b6c4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sqlmesh/dbt/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,12 @@ def canonical_name(self, context: DbtContext) -> str:

@property
def relation_info(self) -> AttributeDict:
extras = {}
external_location = (
self.source_meta.get("external_location", None) if self.source_meta else None
)
external = (
{"external": external_location.replace("{name}", self.table_name)}
if external_location
else {}
)
if external_location:
extras["external"] = external_location.replace("{name}", self.table_name)

return AttributeDict(
{
Expand All @@ -103,6 +101,6 @@ def relation_info(self) -> AttributeDict:
"identifier": self.table_name,
"type": RelationType.External.value,
"quote_policy": AttributeDict(self.quoting),
**external,
**extras,
}
)

0 comments on commit cf4b6c4

Please sign in to comment.