Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Return the rows affected in the adapter response #496

Open
rchui opened this issue Jan 7, 2025 · 1 comment
Open

[Feature] Return the rows affected in the adapter response #496

rchui opened this issue Jan 7, 2025 · 1 comment

Comments

@rchui
Copy link

rchui commented Jan 7, 2025

Other DBT adapters return in their response a field containing the "rows affected" and outputs a log like: [0 1 OK] to indicate the number of rows that were affected by an incremental / table model. This information is useful because these metrics can be harvested to track pipeline throughput and monitor for performance regressions.

It would be useful if dbt-duckdb also returned this.

@jwills
Copy link
Collaborator

jwills commented Jan 10, 2025

Ah yeah I wanted this back in the day when I first started working on the adapter, but IIRC the DuckDB python API didn't support it (i.e., it doesn't actually return the counts of affected rows for the statement via the rowcount field on the cursor object, it's just always -1.

I just tried it out on 1.1.3 and confirmed that it's still the case, and I don't think it's something that is easily fixable in DuckDB itself, see: duckdb/duckdb#7924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants