Skip to content

Commit

Permalink
fix: use .get on column in mssql destination for cases where the yaml…
Browse files Browse the repository at this point in the history
… does not contain the nullable property, like other sql destinations (#1380)
  • Loading branch information
Daniel-Vetter-Coverwhale authored May 17, 2024
1 parent e789093 commit 4c6f928
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dlt/destinations/impl/mssql/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def _get_column_def_sql(self, c: TColumnSchema, table_format: TTableFormat = Non
if c.get(h, False) is True
)
column_name = self.capabilities.escape_identifier(c["name"])
return f"{column_name} {db_type} {hints_str} {self._gen_not_null(c['nullable'])}"
return f"{column_name} {db_type} {hints_str} {self._gen_not_null(c.get('nullable', True))}"

def _create_replace_followup_jobs(
self, table_chain: Sequence[TTableSchema]
Expand Down

0 comments on commit 4c6f928

Please sign in to comment.