DBT 工具:运行时错误编译错误无法呈现

DBT TOOL: Runtime Error Compilation Error Could not render

一般来说,我是 DBT 和数据工程的新手,我正在尝试 运行 DBT CLI,这是我们公司目前拥有的,并且在解决 profile.yml 的一些问题之后dbt_project.yml 我遇到了一个我真的不知道如何解决的问题。

当我尝试 运行 我的测试时,出现以下错误,因此我运行配置文件的调试命令,并得到以下信息:

dbt debug --profile snowtracks_dbt
Running with dbt=0.18.1
dbt version: 0.18.1
python version: 3.8.7
python path: /usr/local/Cellar/dbt/0.18.1_1/libexec/bin/python3
os info: macOS-11.1-x86_64-i386-64bit
Using profiles.yml file at /Users/userName/.dbt/profiles.yml
Using dbt_project.yml file at /Users/UserName/snowtracks_dbt/dbt_project.yml

Configuration:
  profiles.yml file [ERROR invalid]
  dbt_project.yml file [OK found and valid]

Profile loading failed for the following reason:
Runtime Error
  Compilation Error
    Could not render {{ env_var('SF_ACCOUNT') }}: Env var required but not provided: 'SF_ACCOUNT'

Required dependencies:
 - git [OK found]

这是我目前拥有的配置文件:

# For more information on how to configure this file, please see:
# https://docs.getdbt.com/docs/profile
snowtracks_dbt:
  target: dev
  outputs:
    dev:
      type: snowflake
      account: "{{ env_var('SF_ACCOUNT') }}"
      user: "{{ env_var('SF_USER_DEV') }}"
      role: "{{ env_var('SF_ROLE_DEV') }}"
      private_key_path: /tmp/rsa_key_dev.p8
      private_key_passphrase: "{{ env_var('SF_PRV_KEY_DEV_PARAPHRASE') }}"
      database: "{{ env_var('SF_DEV_DB') }}"
      warehouse: "{{ env_var('SF_DEV_WH') }}"
      schema: UNIFIED
      threads: 4
      client_session_keep_alive: False
    prod:
      type: snowflake
      account: "{{ env_var('SF_ACCOUNT') }}"
      user: "{{ env_var('SF_USER_PROD') }}"
      role: "{{ env_var('SF_ROLE_PROD') }}"
      private_key_path: /tmp/rsa_key_prod.p8
      private_key_passphrase: "{{ env_var('SF_PRV_KEY_PROD_PARAPHRASE') }}"
      database: "{{ env_var('SF_PROD_DB') }}"
      warehouse: "{{ env_var('SF_PROD_WH') }}"
      schema: UNIFIED
      threads: 8
      client_session_keep_alive: False

任何对菜鸟的帮助将不胜感激:)

您的 SF_ACCOUNT 环境变量似乎未设置,您必须先配置它。