-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add incremental models #1
Comments
The |
we've tried some thing like below (borrowed the code from other driver). Only tested for presto/hive. Do you think this approach will work ?
And sample model could be like this:
|
Thanks @bachng2017 for the proof of concept for the Use as additional reference:
Provide incremental model functionality with the following strategies:
|
Here is the implementation of I am looking to implement something similar here. |
The incremental strategies supported are: - append - insert_overwrite The incremental strategy `append` inserts new records into target table, without updating or overwriting. The incremental strategy `insert_overwrite` performs first a DELETE statement on the target table to remove the entries that exist with the same `unique_key` in the source table. Afterwards, the records from the source table are inserted into the target table. Resolves: #1
@bachng2017 I was following your suggestion for hive from #1 (comment) :
and the error I get on Trino is:
Test project is available here: https://github.com/findinpath/dbt-trino-incremental-hive BTW this is the
Can you give me a hint on which kind of Hive table did you use the macro that you've pasted previously ? |
this works in my case. Hope it could be a hint.
And one more thing. In our configuration, What is your model ? I think the {%if} block is important. |
As pointed out here: i think that in the absence of merge, the option |
@bachng2017 here is the project which i've used to test the |
hello @findinpath |
btw, what our code try to do is "simulate" the
|
I think because the lack of specific rows to delete you had that error. In above sample, the deletion happens with specific partitions only
|
@bachng2017 do you have any partitions specified in |
@hovaesco as mentioned above, in our test, we do no have any CREATE table directly. Our model (above code) is created based on a seed (csv file) |
The incremental strategy supported is to insert new records into target table, without updating or overwriting. Resolves: #1
@Cabeda / @bachng2017 / @MichelleArk Please to review and provide feedback on the PR. |
The incremental strategy supported is to insert new records into target table, without updating or overwriting. Resolves: #1
The incremental strategy supported is to insert new records into target table, without updating or overwriting. Resolves: #1
The incremental strategy supported is to insert new records into target table, without updating or overwriting. Resolves: #1
The incremental strategy supported is to insert new records into target table, without updating or overwriting. Resolves: #1
The incremental strategy supported is to insert new records into target table, without updating or overwriting. Resolves: #1
The incremental strategy supported is to insert new records into target table, without updating or overwriting. Resolves: #1
The incremental strategy supported is to insert new records into target table, without updating or overwriting. Resolves: #1
The incremental strategy supported is to insert new records into target table, without updating or overwriting. Resolves: starburstdata#1
Opening this task to discuss the best approach to add incremental.
Trino is planning on adding the merge operation trinodb/trino#7708 but I'd say we can start by adding the feature with a
delete+insert
approach as stated here.For now, I'd like to focus on adding support to Hive and Iceberg connector.
Any thoughts on this?
The text was updated successfully, but these errors were encountered: