Skip to content

Commit

Permalink
Faster dbt seeds (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db authored Nov 7, 2023
2 parents c1aff5b + a2c9a36 commit 55dca91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
### Under the Hood

- Added required adapter tests to ensure compatibility with 1.7.0 ([487](https://github.com/databricks/dbt-databricks/pull/487))
- Improved large seed performance by not casting every value (thanks @nrichards17!) ([493](https://github.com/databricks/dbt-databricks/pull/493))

## dbt-databricks 1.7.0rc1 (October 13, 2023)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
insert {% if loop.index0 == 0 -%} overwrite {% else -%} into {% endif -%} {{ this.render() }} values
{% for row in chunk -%}
({%- for col_name in agate_table.column_names -%}
{%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}
{%- set type = column_override.get(col_name, inferred_type) -%}
cast({{ get_binding_char() }} as {{type}})
{{ get_binding_char() }}
{%- if not loop.last%},{%- endif %}
{%- endfor -%})
{%- if not loop.last%},{%- endif %}
Expand Down

0 comments on commit 55dca91

Please sign in to comment.