admin管理员组

文章数量:1291503

I am trying to run dbt transforms in Airflow, my table raw_invoices is already created in US location. still I am getting below error in Airflow.

-- dim_customer.sql

--Create the dimension table 
WITH customer_cte AS 
( SELECT DISTINCT {{ dbt_utils.generate_surrogate_key(['CustomerID', 'Country']) }} 
as customer_id, Country AS country 
FROM 
{{ source('retail', 'raw_invoices') }} 
WHERE CustomerID IS NOT NULL ) 
SELECT t.*, cm.iso 
FROM customer_cte t 
LEFT JOIN {{ source('retail', 'country') }} cm 
ON t.country = cm.nicename
profile.yml

retail:
 target: dev
 outputs:
  dev:
    type: bigquery
    method: service-account
    keyfile: /usr/local/airflow/include/gcp/service_account.json
    project: airtube-390719
    dataset: retail
    threads: 1
    timeout_seconds: 300
    location: US

BQ location

404 Not found: Table airflow-project-446808:retail.raw_invoices was not found in location US;

please help me resolve this issue.

I am trying to run dbt transforms in Airflow, my table raw_invoices is already created in US location. still I am getting below error in Airflow.

-- dim_customer.sql

--Create the dimension table 
WITH customer_cte AS 
( SELECT DISTINCT {{ dbt_utils.generate_surrogate_key(['CustomerID', 'Country']) }} 
as customer_id, Country AS country 
FROM 
{{ source('retail', 'raw_invoices') }} 
WHERE CustomerID IS NOT NULL ) 
SELECT t.*, cm.iso 
FROM customer_cte t 
LEFT JOIN {{ source('retail', 'country') }} cm 
ON t.country = cm.nicename
profile.yml

retail:
 target: dev
 outputs:
  dev:
    type: bigquery
    method: service-account
    keyfile: /usr/local/airflow/include/gcp/service_account.json
    project: airtube-390719
    dataset: retail
    threads: 1
    timeout_seconds: 300
    location: US

BQ location

404 Not found: Table airflow-project-446808:retail.raw_invoices was not found in location US;

please help me resolve this issue.

Share Improve this question asked Feb 13 at 15:04 Shruti PatelShruti Patel 1
Add a comment  | 

1 Answer 1

Reset to default 0

Notice that your project defined in the profile.yaml does not match the one from the error (project: airtube-390719). Double check if the profile is being properly used.

本文标签: