-
Notifications
You must be signed in to change notification settings - Fork 13
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
incremental model "You can only execute one statement at a time." #31
Comments
Thanks for giving this adapter a try! What versions of dbt-sqlite and dbt-core are you using? The major/minor versions need to match, so if you're using dbt-core 1.1.x, make sure you're using dbt-sqlite 1.1.2. if you're using dbt-core 1.2.x, there's a 1.2.0a1 pre-release version you can try. If you still get the error after making sure the versions match, please let me know. |
I realized that I had a mismatch after posting but then tried both of the mentioned combinations to no avail. |
I was able to reproduce this problem. I released v1.1.3 which hopefully fixes this. Please let me know if it works for your case. Note that if your unique key consists of multiple fields, this will only work with I opened #32 with some notes for other fixes/improvements that need to be made to the incremental materialization. |
Works pretty well. For now I'll use |
Also, in case you're interested, here's my work in progress (for now mostly in german, I think I'll translate it later) |
Thank you for the feedback! I know dbt-core 1.2.x has a concat macro but I don't know whether the macro from dbt_utils works for sqlite. I released 1.2.0a2 with the same fix in case you want to try that. Since concat is a macro, you would need to do something like this, assuming the string to unique_key gets through jinja: |
Oh, I see where my mistake was. |
Hi,
love the idea of a dbt sqlite adapter for demos and stuff.
Am working on a demo and wanted to show incremental functionality.
If you provide a unique key, then the macro sqlite_incremental_upsert tries to commit two comments (deletion and insert) leading to the
"You can only execute one statement at a time."
error.
I'll try to share the demo as well (will have to first configure github properly) and will try to help once I got deeper into the sqlite adapter.
But maybe you already have a quick idea how to solve this (or figure out what I'm doing wrong)
Cheers Hannes
The model is basically
The text was updated successfully, but these errors were encountered: