dbt-labs / dbt-labs/dbt-adapters

[Feature] explicitly list out all columns for snowflake's `insert_overwrite` strategy instead of using `*`

Open
#1,667 0 comments 0 reactions 0 assignees View on GitHub
pkg:dbt-snowflake type:enhancement
Dominant language
Python
Stars
233
Forks
362
Avg merge
3d 22h
Merged PRs (30d)
9

Description

### Describe the feature

For the `insert_overwrite` strategy in snowflake, the [macro](https://github.com/dbt-labs/dbt-adapters/blob/main/dbt-snowflake/src/dbt/include/snowflake/macros/materializations/incremental/insert_overwrite.sql) currently uses `SELECT *` (when no `overwrite_columns` are provided) instead of explicitly listing all columns (as done in other strategies).

Proposal: generate SQL with an explicit column list instead of `SELECT *`

This _would_ add a small amount of overhead (i.e. we need to make a call to get the columns).

### Additional Context

[internal slack thread](https://dbt-labs.slack.com/archives/C044WU55X7Y/p1771957371498169)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.