Skip to content

Commit

Permalink
Get table from schema.tables
Browse files Browse the repository at this point in the history
  • Loading branch information
sultaniman committed Apr 19, 2024
1 parent 6c5b8bb commit d35775a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dlt/common/normalizers/json/relational.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _is_complex_type(self, table_name: str, field_name: str, _r_lvl: int) -> boo
# turn everything at the recursion level into complex type
max_nesting = self.max_nesting
schema = self.schema
table = schema.get_table(table_name)
table = schema.tables.get(table_name, {})
max_table_nesting = table.get("x-normalizer", {}).get("max_nesting") # type: ignore[attr-defined]
if max_table_nesting is not None:
max_nesting = max_table_nesting
Expand All @@ -93,6 +93,7 @@ def _is_complex_type(self, table_name: str, field_name: str, _r_lvl: int) -> boo
# path = f"{table_name}▶{field_name}"
# or use definition in the schema
column: TColumnSchema = None
table = schema.get_table(table_name)
if table:
column = table["columns"].get(field_name)
if column is None:
Expand Down

0 comments on commit d35775a

Please sign in to comment.