rinchinov / ij-dbt-plugin

intelllij Idea plugin for DBT
https://plugins.jetbrains.com/plugin/23789-dbt
GNU General Public License v3.0
12 stars 1 forks source link

DBT Query Can't Handle Environmental Variables in Profiles #58

Closed ianjeffries closed 2 months ago

ianjeffries commented 2 months ago

Getting this error when I try to use DBT Query:

dbt.exceptions.EnvVarMissingError: Parsing Error
  Env var required but not provided: 'DBT_ENV_SNOWFLAKE_ACCOUNT'
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Env': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: (String)"Env var required but not provided: 'DBT_ENV_SNOWFLAKE_ACCOUNT'"; line: 1, column: 4]

We use env variables to control everything in profiles, not sure where I'm supposed to input these.

rinchinov commented 2 months ago

Hi!

Which plugin version do you use?

Currently, option DBT environment variables in plugin settings is the only way to set env variables for plugin. Did you tried it?

image
ianjeffries commented 2 months ago

Thanks for the response! I'm using Version 0.1.5. I had looked in DBT Project Settings for that option but didn't see anything:

image

I'm on MacOS if that makes a difference?

rinchinov commented 2 months ago

This option was added only at 0.2.1, unfortunately newest versions of plugin are available only for latest IDEs(>=2024.1), please try to update IDE version to latest.

ianjeffries commented 2 months ago

That did it, thank you! So far loving the plugin - especially the auto-complete

ianjeffries commented 2 months ago

Needed to update to latest pycharm version so I could use 0.2.1