i'm getting an error in the tutorial
# getting-started
a
i'm getting an error in the tutorial
e
Hi @Aoi Ghost! What's the command from the tutorial that you tried to run?
a
meltano invoke dbt-postgres:initialize
e
Gotcha. Can you try running
meltano lock --update --all
and then retry that command?
a
still erroring
e
If you run
meltano install
does it succeed?
a
d typing_extensions-4.12.0-py3-none-any.whl.metadata (3.0 kB) Collecting psycopg2<3.0,>=2.9 (from dbt-postgres) Using cached psycopg2-2.9.9.tar.gz (384 kB) Preparing metadata (setup.py): started error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. Preparing metadata (setup.py): finished with status 'error' error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. 2024-05-31T161711.205559Z [warning ] Installed 3/4 plugins Need help fixing this problem? Visit http://melta.no/ for troubleshooting steps, or to join our friendly Slack community.
e
Ah, I think this is https://github.com/dbt-labs/dbt-postgres/issues/96. Can you try changing the
pip_url
of the
dbt-postgres
plugin to:
Copy code
pip_url: dbt-core dbt-postgres<1.8 git+<https://github.com/meltano/dbt-ext.git@main>
See also https://meltano.slack.com/archives/C069CQNHDNF/p1716970325532189.
a
new error
meltano invoke dbt-postgres:run 2024-05-31T165855.981200Z [info ] Environment 'dev' is active Extension executing
dbt clean
... Usage: dbt clean [OPTIONS] Try 'dbt clean -h' for help. Error: Invalid value for '--profiles-dir': Path '/home/aoi/my-new-project/transform/profiles/postgres' does not exist. error invoking dbt clean error_message=pre invoke step of
dbt clean
failed returncode=2
e
I think you're missing the initialize one before that
a
meltano invoke dbt-postgres:run 2024-05-31T170443.622794Z [info ] Environment 'dev' is active Extension executing
dbt clean
... 170446 [WARNING]: Deprecated functionality User config should be moved from the 'config' key in profiles.yml to the 'flags' key in dbt_project.yml. 170446 Running with dbt=1.7.15 170446 [WARNING]: Deprecated functionality The
target-path
config in
dbt_project.yml
has been deprecated, and will no longer be supported in a future version of dbt-core. If you wish to write dbt artifacts to a custom directory, please use the --target-path CLI flag or DBT_TARGET_PATH env var instead. 170446 Encountered an error: Runtime Error dbt will not clean the following directories outside the project: ['/home/aoi/my-new-project/.meltano/transformers/dbt/target'] error invoking dbt clean error_message=pre invoke step of
dbt clean
failed returncode=2
meltano invoke dbt-postgres:initialize 2024-05-31T170436.987688Z [info ] Environment 'dev' is active creating dbt profiles directory path=PosixPath('/home/aoi/my-new-project/transform/profiles/postgres') dbt initialized dbt_ext_type=postgres dbt_profiles_dir=PosixPath('/home/aoi/my-new-project/transform/profiles/postgres') dbt_project_dir=PosixPath('/home/aoi/my-new-project/transform') aoi@Bladerunner:~/my-new-project$ meltano invoke dbt-postgres:run
still broken
e
Can you try setting
DBT_CLEAN_PROJECT_FILES_ONLY=false
in your environment?
a
meltano invoke dbt-postgres:run 2024-05-31T173906.056058Z [info ] Environment 'dev' is active Extension executing
dbt clean
... 173909 [WARNING]: Deprecated functionality User config should be moved from the 'config' key in profiles.yml to the 'flags' key in dbt_project.yml. 173909 Running with dbt=1.7.15 173909 [WARNING]: Deprecated functionality The
target-path
config in
dbt_project.yml
has been deprecated, and will no longer be supported in a future version of dbt-core. If you wish to write dbt artifacts to a custom directory, please use the --target-path CLI flag or DBT_TARGET_PATH env var instead. 173909 Encountered an error: Runtime Error dbt will not clean the following directories outside the project: ['/home/aoi/my-new-project/.meltano/transformers/dbt/target'] error invoking dbt clean error_message=pre invoke step of
dbt clean
failed returncode=2
after se t t ing
e
Hmm. How did you set the env var?
a
TAP_GITHUB_AUTH_TOKEN='github_pat_' meltano select tap-github --list --all DBT_CLEAN_PROJECT_FILES_ONLY=false
e
You might wanna do
export DBT_CLEAN_PROJECT_FILES_ONLY=false
a
that worked
i appreciate it
i'm trying to learn for a project i'm working on
going to have to add a few plugins
neo4j etc
e
Np! Thanks for bearing with me. I think I've gotta update the getting started guide with findings from this thread 😄.