trying to run `meltano invoke dbt:run` on a docker...
# troubleshooting
j
trying to run
meltano invoke dbt:run
on a docker container (through dagster), but I get the following error:
Copy code
dagster.core.definitions.events.Failure: Shell command execution failed with output: Executable 'dbt' could not be found. Transformer 'dbt' may not have been installed yet using `meltano install transformer dbt`, or the executable name may be incorrect.
I ran
RUN meltano install
in the Dockerfile during the docker build step and I can log into the container and see that
.meltano/transformers/dbt/venv/
is populated with all the seemingly relevant packages. The
invoke
command works when I run it from my local terminal. Also, a
meltano elt …
command runs just fine in the dagster docker instance except when I add the
--transform=run
command. It errors with the same error message when it gets to the transform step. Relevant portion of
meltano.yml
file:
Copy code
...
plugins:  
...
  transformers:
  - name: dbt
    pip_url: dbt==0.19.1
d
@josh_lloyd Can you confirm there’s an executable at
.meltano/transformers/dbt/bin/dbt
?
j
yes
Copy code
root@4f85690f794a:/opt/dagster/app/.meltano/transformers/dbt/venv# ls bin/
__pycache__  activate.csh   chardetect  jp.py       keyring  pip3    pybabel  pyrsa-decrypt  pyrsa-keygen    pyrsa-sign    python   slugify               snowflake-dump-ocsp-response        snowflake-export-certs  wheel
activate     activate.fish  dbt         jsonschema  pip      pip3.7  pyjwt    pyrsa-encrypt  pyrsa-priv2pub  pyrsa-verify  python3  snowflake-dump-certs  snowflake-dump-ocsp-response-cache  sqlformat
d
@josh_lloyd Now that you’re in the container, can you run
meltano install transformer dbt
again, and see if that fixes it and lets you run
meltano invoke dbt
again?
j
wrong josh 😉, but yeah, give me a sec
d
😅 Slack should really rank people in the same thread before randos when I type
@josh
!
j
🙂 no kidding! didn’t work:
Copy code
root@4f85690f794a:/opt/dagster/app# meltano invoke dbt
Executable 'dbt' could not be found. Transformer 'dbt' may not have been installed yet using `meltano install transformer dbt`, or the executable name may be incorrect.
d
Try with
meltano --log-level=debug …
Let’s see if we can get some more stacktrace info
j
output.txt
d
Copy code
FileNotFoundError: [Errno 2] No such file or directory: '/opt/dagster/app/transform': '/opt/dagster/app/transform'
Does that directory exist?
Where does your
dbt_project.yml
live?
j
oh, yeah you’re right I forgot to copy that dir in the dockerfile
d
😄
That’ll do it!
j
haha. Love dumb user errors 😄
d
Glad we were able to figure it out 🙂 The error message was pretty misleading in this case
j
thanks a ton for the help!!