and also unrelated, real question this time: I bel...
# troubleshooting
j
and also unrelated, real question this time: I believe I followed the steps of the getting started guide but now I'm getting
Copy code
meltano invoke dbt-bigquery:run --models x

2022-07-25T12:27:48.539010Z [info     ] Environment 'dev' is active
12:27:53  Encountered an error while reading the project:
12:27:53    ERROR: Runtime Error
  Could not find profile named 'meltano'
12:27:53  Encountered an error:
Runtime Error
  Could not run dbt
in fact I have a working dbt project somewhere else but it's still running in
meltano<2.0
and I'm wondering what did I do differently...
t
try
meltano invoke dbt-bigquery run --models x
The
:
is referencing a specific command. On invoke you can do that but it's also useful to just pass in the command and any flags you want
j
thanks @taylor, same error
Copy code
!meltano invoke dbt-bigquery run --models x

2022-07-25T14:19:38.235471Z [info     ] Environment 'dev' is active
14:19:42  Encountered an error while reading the project:
14:19:42    ERROR: Runtime Error
  Could not find profile named 'meltano'
14:19:42  Encountered an error:
Runtime Error
  Could not run dbt
t
Oh I didn't even notice the error the first time. Can you rerun with
--log-level=debug
and see if there's more info. I think the error is likely coming from something configured weirdly with your
dbt_project.yml
but I could be wrong
j
ok, by comparing with the older working project I had before I see I was missing
export DBT_BIGQUERY_PROFILES_DIR=/project-dir/meltano/transform/profile/
. checking the "getting started" guide I don't see any mention of it - which supposedly makes sense, because according to https://hub.meltano.com/transformers/dbt-bigquery#profiles-dir, the default value for
DBT_BIGQUERY_PROFILES_DIR
is
$MELTANO_PROJECT_ROOT/transform/profile
. Am I doing something wrong here?
t
if you run
meltano config dbt-bigquery list
is that value appropriately set?
j
🤔 sort of, I think I see what's happening here. there is indeed a
profiles_dir
setup:
Copy code
meltano config dbt-bigquery list
2022-07-25T14:39:53.846941Z [info     ] Environment 'dev' is active
2022-07-25T14:39:54.620934Z [info     ] The default environment (dev) will be ignored for `meltano config`. To configure a specific Environment, please use option `--environment=<environment name>`.
project_dir [env: DBT_BIGQUERY_PROJECT_DIR] current value: '/project-dir/meltano/transform' (default: '$MELTANO_PROJECT_ROOT/transform')
profiles_dir [env: DBT_BIGQUERY_PROFILES_DIR] current value: '/project-dir/meltano/transform/profiles/bigquery' (default: '$MELTANO_PROJECT_ROOT/transform/profiles/bigquery')
however, my profile happens to be in
$MELTANO_PROJECT_ROOT/transform/profile
rather than in
$MELTANO_PROJECT_ROOT/transform/profiles/bigquery
. I didn't touch any of this, the files were created automatically after doing
meltano add transformer dbt-bigquery
. perhaps the file bundle used was
files-dbt
instead of
files-dbt-bigquery
?
t
Oh then that's a bug with the file bundle! This is one of the challenges with the dbt plugins that we aim to solve with https://github.com/meltano/meltano/issues/6434 - since things are spread across a few repos then subtle bugs like this can creep in. I'll file an issue on this to have the team review the metadata and files bundles. For now, you can either set the value to point to the location where your file actually is or move the file itself.
j
thanks @taylor! subscribed there, feel free to cc
<http://github.com/@astrojuanlu|github.com/@astrojuanlu>
if you end up opening an issue (or let me know in which repo should I open it myself)
t
I'll @ you 🙂