duckdb / duckdb/duckdb-postgres

duckdb.duckdb.BinderException: Binder Error: table gto_skc_store_step_kpi_summary has 213 columns but 184 values were supplied

Open
#227 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
372
Forks
105
Avg merge
10h 19m
Merged PRs (30d)
18

Description

I am performing calculations in DuckDB and then writing the results back to Greenplum. Since the rows are dynamic and the number of columns changes daily, I need to rebuild the table. The “CREATE TABLE AS” statement in DuckDB does not allow for the addition of distribution keys and compression settings, so I first use the postgres_execute function to create the table and then write the data. However, at this point, I receive an error indicating that the number of columns is different. This is likely because, when attaching, the table structure from Greenplum (i.e., yesterday’s structure) is obtained. How can I access the table that was just created so that I can reattach to it? Or are there any other suggestions?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.