当我遵循tutorial of dbt-CLI时,当我运行:dbt run命令时,在访问BigQuery上的dataset dbt-tutorial存储时出现错误。
如下所示:
$ 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发布于 2021-12-03 15:05:21
发生此错误的原因可能是位置EU中的dbt-tutorial:jaffle_shop.orders表不可用。
您应该在您的dbt profiles.yml中使用location:US,并在创建Big Query帐户时将"treatment location“设置为"US”(否则将出现404错误)。
如果您尝试在大型查询UI中使用"EU“位置运行请求,您将得到与在dbt-cli中相同的错误:


https://stackoverflow.com/questions/70216411
复制相似问题