DBT : Access Denied to Table dbt-tutorial:jaffle_shop.orders

Viewed 809

When I follow the tutorial of dbt-CLI, I have an error access to the dataset dbt-tutorial store on BigQuery when I run: dbt run command.

See below :

$ dbt run
Running with dbt=0.21.1
Found 3 models, 4 tests, 0 snapshots, 0 analyses, 184 macros, 0 operations, 0 seed files, 0 sources, 0 exposures

15:01:05 | Concurrency: 1 threads (target='dev')
15:01:05 |
15:01:05 | 1 of 3 START table model dbt_username.customers........................ [RUN]
15:01:05 | 1 of 3 ERROR creating table model dbt_adrien.customers............... [ERROR in 0.74s]
15:01:05 | 2 of 3 START table model dbt_username.my_first_dbt_model............... [RUN]
15:01:08 | 2 of 3 OK created table model dbt_adrien.my_first_dbt_model.......... [CREATE TABLE (2.0 rows, 0.0 Bytes processed) in 2.39s]
15:01:08 | 3 of 3 START view model dbt_username.my_second_dbt_model............... [RUN]
15:01:09 | 3 of 3 OK created view model dbt_username.my_second_dbt_model.......... [OK in 0.97s]
15:01:09 |
15:01:09 | Finished running 2 table models, 1 view model in 4.88s.

Completed with 1 error and 0 warnings:

Database Error in model customers (models/customers.sql)
  Access Denied: Table dbt-tutorial:jaffle_shop.orders: User does not have permission to query table dbt-tutorial:jaffle_shop.orders.
  compiled SQL at target/run/jaffle_shop/models/customers.sql

Done. PASS=2 WARN=0 ERROR=1 SKIP=0 TOTAL=3
1 Answers

This error probably occurs because dbt-tutorial:jaffle_shop.orders table is not available in location EU.

You should use location:US in your dbt profiles.yml and set "treatment location" to "US" when you create your Big Query account (if not you will have a 404 error).

If you try to run the request in Big Query UI with "EU" location you will get the same error than in dbt-cli : enter image description here big query dbt error

Related