-
Notifications
You must be signed in to change notification settings - Fork 15
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 not inserting #177
Comments
to whom it may concern: @cloudera-hudson @myloginid @shreelola @vamshikolanu I found out what the problem is and I would consider it a bug: In the profiles.yml another user is connecting to impala having all rights on schema econda. When running the incremental model the first time, the table is created fine. When running subsequently it is failing because it wants to create the table again rather than doing an insert as configured in the models config. In incremental mode the program is somehow trying to identify the table in the schema of the user that is logged in and not in the schema specified in the project.yml I tested the behavior by eliminating the "+schema: econda" part from the project.yml and it was working as expected in the schema of the user that is logged in. I want to be able though to use the schema that is not equal to the users schema that I'm logged in with. BTW I'm using custom schema macro as described at https://docs.getdbt.com/docs/build/custom-schemas Your feedback is very much appreciated. |
Thanks @pmheld for further information about the issue, We will update the issue soon and provide the fix. |
Hello @pmheld. Can you please share the complete debug logs with us? We are unable to reproduce the issue on our end. We have tested our code with this example to reproduce the scenario you mentioned, and it works fine. Please notice: https://github.com/cloudera/dbt-impala-example/blob/main/dbt_impala_demo/dbt_project.yml#L50 has a custom schema defined too. I wonder if show tables isn't working in your case. |
Hi @vamshikolanu,
attached you find the logs and your guess seems tob e right, as far as I interpret the logs.
Hope this helps.
Thanks
Von: vamshi ***@***.***>
Gesendet: Montag, 18. September 2023 19:16
An: cloudera/dbt-impala ***@***.***>
Cc: Held, Patrick ***@***.***>; Mention ***@***.***>
Betreff: Re: [cloudera/dbt-impala] incremental strategy not inserting (Issue #177)
Hello @pmheld<https://github.com/pmheld>. Can you please share the complete debug logs with us? We are unable to reproduce the issue on our end. We have tested our code with this example<https://github.com/cloudera/dbt-impala-example/tree/main/dbt_impala_demo> to reproduce the scenario you mentioned, and it works fine.
Please notice: https://github.com/cloudera/dbt-impala-example/blob/main/dbt_impala_demo/dbt_project.yml#L50 has a custom schema defined too.
I wonder if show tables isn't working in your case.
-
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A6VZON55IFAEPAVR7R5ONXDX3B6VLANCNFSM6AAAAAAZZYQKTQ>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Hello @pmheld, I can't find logs here. Did you forget to attach logs? |
Hi @vamshikolanu, sorry, I attached the file in the reply but obviously it doesn't work. |
Hi @ vamshikolanu,
any suggestions on this? Do I have to check with impala/cloudera or could it be an issue related to python, kerberos or dbt?
Thanks,
Patrick
Von: Held, Patrick
Gesendet: Dienstag, 19. September 2023 15:07
An: cloudera/dbt-impala ***@***.***>
Betreff: AW: [cloudera/dbt-impala] incremental strategy not inserting (Issue #177)
Hi @vamshikolanu,
attached you find the logs and your guess seems tob e right, as far as I interpret the logs.
Hope this helps.
Thanks
Von: vamshi ***@***.******@***.***>>
Gesendet: Montag, 18. September 2023 19:16
An: cloudera/dbt-impala ***@***.******@***.***>>
Cc: Held, Patrick ***@***.******@***.***>>; Mention ***@***.******@***.***>>
Betreff: Re: [cloudera/dbt-impala] incremental strategy not inserting (Issue #177)
Hello @pmheld<https://github.com/pmheld>. Can you please share the complete debug logs with us? We are unable to reproduce the issue on our end. We have tested our code with this example<https://github.com/cloudera/dbt-impala-example/tree/main/dbt_impala_demo> to reproduce the scenario you mentioned, and it works fine.
Please notice: https://github.com/cloudera/dbt-impala-example/blob/main/dbt_impala_demo/dbt_project.yml#L50 has a custom schema defined too.
I wonder if show tables isn't working in your case.
-
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A6VZON55IFAEPAVR7R5ONXDX3B6VLANCNFSM6AAAAAAZZYQKTQ>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
@cloudera-hudson @myloginid @shreelola @vamshikolanu |
Hi,
I have dbt-impala==1.4.0 and dbt-core==1.4.1 installed and experience a problem with a model that should use materialized='incremental'.
The issue is that this single model in the project is initially running fine since no table existed in the Cloudera CDP (Impala) but the second time that I'm running dbt it tries to create the table that already exists rather than doing an insert respectively an append to the table.
This is what dbt show while running:
The project.yml looks like this:
The model looks like this:
This is converted into:
From what I've seen in the 860 lines of the log file this part migth be interesting:
Unfortunately I'm not able to append the data to an existing table, even when I play around with the config options e.g. changing the materialized to incremental in the dbt_project.yml or inside the model config.
After posting in the slack channel I was routed to this place and hope to find help here.
Thanks.
The text was updated successfully, but these errors were encountered: