-
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
InvalidOperationException: new table <dbname>.<table> already exists #26
Comments
Hey @bhctsntrk - can you let us know which version of the adapter you are using? If you are on dbt-impala==1.0.4 can you give it a try dbt-impala==1.0.5rc2 - we included a fix for #16 It looks like you're using the jaffle-shop demo, where the staging models are materialised as views - I think you are likely running into #16 which is incorrectly handling those views as tables |
Hello @sdairs , We updated to 1.0.5rc2 after encountering with #16 . For additional information our model structure is:
'''customers_dbt.sql'''
with customers as (
select * from {{ ref('stg_customers') }}
),
orders as (
select * from {{ ref('stg_orders') }}
),
customer_orders as (
select
customer_id,
min(order_date) as first_order_date,
max(order_date) as most_recent_order_date,
count(order_id) as number_of_orders
from orders
group by 1
),
final as (
select
customers.customer_id,
customers.first_name,
customers.last_name,
customer_orders.first_order_date,
customer_orders.most_recent_order_date,
coalesce(customer_orders.number_of_orders, 0) as number_of_orders
from customers
left join customer_orders using (customer_id)
)
select * from final '''staging/stg_orders.sql'''
select
id as order_id,
user_id as customer_id,
order_date,
status
from testdb.js_orders '''staging/stg_customers.sql'''
select id as customer_id, first_name, last_name
from testdb.js_customers '''dbt_project.yml'''
name: 'jaffle_shop'
config-version: 2
version: '0.1'
profile: 'jaffle_shop'
model-paths: ["models"]
seed-paths: ["seeds"]
test-paths: ["tests"]
analysis-paths: ["analysis"]
macro-paths: ["macros"]
target-path: "target"
clean-targets:
- "target"
- "dbt_modules"
- "logs"
require-dbt-version: [">=1.0.0", "<2.0.0"]
models:
jaffle_shop:
materialized: table
staging:
materialized: table
|
Thanks @bhctsntrk - will see if we can reproduce the error here |
Hi @bhctsntrk - we merged #27 included in release 1.0.5 - can you give it a try and let us know if it helps with your issue at all? Thanks |
@tovganesh I caught up with @bhctsntrk and it seems he is still facing the issue - we'll have to take another look at repro |
@bhctsntrk let me know if you are still facing this issue, I am not able to reproduce the issue in the latest version 1.3.2. |
Hi,
We have a problem with drop,rename statements when using dbt-impala.
The firs dbt run command works nicely and the tables created. However, the second execution of dbt run command result like this:
It says testdb.stg_orders and testdb.stg_orders tables are still there and not dropped. But when we query from Impala(HUE):
We get this error:
And if we query from Hive(HUE) we see the tables not dropped. To solve this problem we have to execute invalidate metadata query and Impala start to see the tables. But still tables are not dropped so rename operation failed.
Is this error related with dbt-impala?
Thanks for helping.
The text was updated successfully, but these errors were encountered: