我尝试在 GCP 云 shell 上使用 DBT cli 运行 DBT 模型失败。
这里是细节-
个人资料.yml
default:
target: dev
outputs:
dev:
dataset: my_dataset
job_execution_timeout_seconds: 1000
job_retries: 1
location: EU
method: service-account
priority: interactive
project: my_project
threads: 4
type: bigquery
keyfile_json:
type: service_account
project_id: XXXXXXX
private_key_id: vasljasgjaspogjsapodgjasaklgjsagjs
private_key: -----BEGIN PRIVATE KEY-----\nYYYYYYY\n-----END PRIVATE KEY-----\n
client_email: XXXXXXXXX.iam.gserviceaccount.com
client_id: 9577623947510934752394752
auth_uri: https://accounts.google.com/o/oauth2/auth
token_uri: https://oauth2.googleapis.com/token
auth_provider_x509_cert_url: https://www.googleapis.com/oauth2/v1/certs
client_x509_cert_url: https://www.googleapis.com/EWPOTEOIGH;LSGJJ;LJgcpsecuritykey-gbl-ww-pd.iam.gserviceaccount.com
dbt_profile.yml文件-
# Name your project!
name: 'my_new_project'
version: '1.0.0'
config-version: 2
# This setting configures which "profile" dbt uses for this project.
profile: 'default'
# These configurations specify where dbt should look for different types of files.
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target"
.......
......
.......
这就是我运行 dbt 模型的方式 → dbt run --select model_name
下面是我得到的错误-
(dbt) user@cloudshell:~/git_repo$ dbt run --select my_model
12:57:32 Running with dbt=1.4.4
12:57:32 [WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- models.my_project.example
12:57:32 Found 130 models, 5 tests, 0 snapshots, 0 analyses, 784 macros, 0 operations, 1 seed file, 91 sources, 0 exposures, 0 metrics
12:57:32
12:57:32
12:57:32 Finished running in 0 hours 0 minutes and 0.01 seconds (0.01s).
12:57:32 Encountered an error:
Database Error
expected str, bytes or os.PathLike object, not NoneType