-
Notifications
You must be signed in to change notification settings - Fork 111
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 strategy insert_delete is not valid. use_lw_deletes Being ignored #133
Comments
Yes, I think this is a bug. Currently you must also set |
Btw there is a PR for the updated documentation. https://github.com/dbt-labs/docs.getdbt.com/pull/2626/files |
Are you using HTTP or the native interface? |
Native |
So I can't reproduce this . . . the correct name is definitely if not conn.handle.has_lw_deletes and strategy == 'delete_insert':
logger.warning(
'Lightweight deletes are not available, using legacy ClickHouse strategy'
)
strategy = 'legacy' Can you tell if it is getting set correctly at the line of code you pasted above? |
Here's my profile definition:
|
So you get the warning on 1.3.3? If possible you could just hack a print statement into the source code, or you could check the ClickHouse query log for a query like I just don't know what's happening since I can't reproduce locally. |
The result of the query is
output is:
So looks like maybe the setting isn't cascading properly ? |
The setting can be per profile, per user, per session, or per query. If you just set that in a session with clickhouse-client it will only be for that session. You probably need to update the setting in either the user profile or user xml (or via the SQL cli) so that it "sticks". |
Gotcha - I'll give that a try tomorrow as there's active processes I can't stop right now. Closing as opening another sessions shows the value different. It's likely that! |
No problem . . . thanks for opening an issue. Other people may well run into the same thing and we should at a minimum document the process better. |
The other option is to try to set it directly from dbt for the dbt session, so I'll investigate that for the next release. |
@genzgd do you know if theres a specific way of applying this config to the users.xml? Appreciate this is going off topic now but hoping it's something you're familiar with 🙏 |
That xml should go either either into a specific user element or profile element. For my local test server I put it in the "default" profile element in my users.xml:
|
Setting it on the user's block seems to have been my error. Setting it up on the profile worked - Thank you! |
Hi There,
It seems that since version 1.3.0 the incremental strategy reference has changed but this isn't documented.
Any model using
incremental_strategy='insert+delete'
throws:The incremental strategy 'insert_delete' is not valid for Clickhouse
. This is on version 1.3.2/1.3.3Changing the strategy to
incremental_strategy='delete_insert'
resolves this error however it wrongfully throws this message after:dbt_clickhouse adapter: Lightweight deletes are not available, using legacy ClickHouse strategy
Lightweight deletes are enabled in our instance.
The text was updated successfully, but these errors were encountered: