Daniele Tarek Iaisy
09/09/2025, 9:51 AMplugins:
...
transformers:
- name: dbt
variant: dbt-labs
pip_url: dbt-core==1.10.11 dbt-bigquery==1.10.2
config:
project_dir: $MELTANO_PROJECT_ROOT/../transformation/dbt
profiles_dir: $MELTANO_PROJECT_ROOT/../transformation/dbt/profiles
jobs:
- name: ingestion
tasks:
- tap-mssql target-bigquery
- tap-rest-api-msdk target-bigquery
- name: transformation
tasks:
- dbt:build
- name: source_freshness
tasks:
- dbt:freshness
- name: ingest_and_transform
tasks:
- tap-mssql target-bigquery
- tap-rest-api-msdk target-bigquery
- dbt:build
with this i can easily run dbt using meltano on my pc, for example:
(.venv) user@personal-computer:/meltano-project$ meltano invoke dbt --version
Environment 'dev' is active
Core:
- installed: 1.10.11
- latest: 1.10.11 - Up to date!
Plugins:
- bigquery: 1.10.2 - Up to date!
but the same test fails when run inside a docker container:
root@28ec0fcfb4f8:/project# meltano --log_level=debug invoke dbt --version
Meltano 3.9.1, Python 3.11.13, Linux (x86_64)
Environment 'dev' is active
Creating DB engine for project at '/project' with DB URI 'sqlite:////project/.meltano/meltano.db'
Found plugin parent
Skipped installing transformer 'dbt'
Skipped installing 1/1 plugins
Variable '$MELTANO_LOAD__TARGET_SCHEMA' is not set in the provided env dictionary.
Variable '$MELTANO_TRANSFORM__PACKAGE_NAME' is not set in the provided env dictionary.
Variable '$MELTANO_EXTRACTOR_NAMESPACE' is not set in the provided env dictionary.
Variable '$MELTANO_LOAD__TARGET_SCHEMA' is not set in the provided env dictionary.
Variable '$MELTANO_TRANSFORM__PACKAGE_NAME' is not set in the provided env dictionary.
Variable '$MELTANO_EXTRACTOR_NAMESPACE' is not set in the provided env dictionary.
Variable '$MELTANO_LOAD__TARGET_SCHEMA' is not set in the provided env dictionary.
Variable '$MELTANO_TRANSFORM__PACKAGE_NAME' is not set in the provided env dictionary.
Variable '$MELTANO_EXTRACTOR_NAMESPACE' is not set in the provided env dictionary.
Invoking: ['/project/.meltano/transformers/dbt/venv/bin/dbt', '--version']
Need help fixing this problem? Visit <http://melta.no/> for troubleshooting steps, or to join our friendly Slack community.
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.
again, note that meltano is installed and if I try running it manually I'd have no problems with it, only meltano is failing:
root@28ec0fcfb4f8:/project# ls .meltano/transformers/dbt/
venv
root@28ec0fcfb4f8:/project# .meltano/transformers/dbt/venv/bin/dbt --version
Core:
- installed: 1.10.11
- latest: 1.10.11 - Up to date!
Plugins:
- bigquery: 1.10.2 - Up to date!visch
09/09/2025, 1:44 PMDocker file?visch
09/09/2025, 1:46 PMInvoking: ['/project/.meltano/transformers/dbt/venv/bin/dbt', '--version']
So it's trying to figure out if it's a permission thing and/or why
Skipped installing transformer 'dbt'
Happens instead of it installingDaniele Tarek Iaisy
09/09/2025, 2:17 PMFROM python:3.11
RUN apt-get update && apt-get install git -y
WORKDIR /project
RUN mkdir transformation
RUN mkdir ingestion
# copy meltano project
COPY ingestion/.env ./ingestion
COPY ingestion/meltano.yml ./ingestion
# copy dbt project
COPY transformation/dbt ./transformation
COPY transformation/dbt-sa ./transformation
# configure Meltano project
RUN pip install --upgrade pip
RUN pip install meltano dbt-core dbt-bigquery
WORKDIR /project/ingestion
RUN meltano lock --update --all
RUN meltano install
# ENV PATH="/project/ingestion/.meltano/transformers/dbt/venv/bin:${PATH}"
ENTRYPOINT [ "meltano" ]
however i had the same issue when using the exact same Dockerfile with FROM meltano/meltano:latest as a base image.
As you can see I usually run meltano lock and install before doing anything so I think the reason why the invokation skips installing dbt is because it was successfully installed before the meltano invoke
I thought it might have been either a file permission or dbt not being in the path so i tried including it and checking file permissions, but it didnt really help and files as readable and executable
user@personal-computer:~/meltano-project$ docker run -it --entrypoint bash localmeltano:latest
root@5b8a196d73c1:/project/ingestion# whoami
root
root@5b8a196d73c1:/project/ingestion# ls -la .meltano/transformers/dbt/venv/
total 32
drwxr-xr-x 4 root root 4096 Sep 9 14:06 .
drwxr-xr-x 3 root root 4096 Sep 9 14:05 ..
-rw-r--r-- 1 root root 1 Sep 9 14:05 .gitignore
-rwxrwxrwx 1 root root 0 Sep 9 14:05 .lock
-rw-r--r-- 1 root root 64 Sep 9 14:06 .meltano_plugin_fingerprint
-rw-r--r-- 1 root root 43 Sep 9 14:05 CACHEDIR.TAG
drwxr-xr-x 2 root root 4096 Sep 9 14:06 bin
drwxr-xr-x 3 root root 4096 Sep 9 14:05 lib
lrwxrwxrwx 1 root root 3 Sep 9 14:05 lib64 -> lib
-rw-r--r-- 1 root root 112 Sep 9 14:05 pyvenv.cfg
root@5b8a196d73c1:/project/ingestion# ls -l .meltano/transformers/dbt/venv/bin/dbt
-rwxr-xr-x 1 root root 336 Sep 9 14:06 .meltano/transformers/dbt/venv/bin/dbt
root@5b8a196d73c1:/project/ingestion# cat /project/ingestion/.meltano/transformers/dbt/venv/bin/dbt
#!/project/ingestion/.meltano/transformers/dbt/venv/bin/python
# -*- coding: utf-8 -*-
import sys
from dbt.cli.main import cli
if __name__ == "__main__":
if sys.argv[0].endswith("-script.pyw"):
sys.argv[0] = sys.argv[0][:-11]
elif sys.argv[0].endswith(".exe"):
sys.argv[0] = sys.argv[0][:-4]
sys.exit(cli())
Today I also tried opening a shell in the meltano/meltano:latest image, installed nano, manually copied the meltano.yml and .env files and ran the installation manually, doing the same steps I did when i got the project working on my PC but I still got the same errorDaniele Tarek Iaisy
09/10/2025, 1:44 PMmeltano/src/meltano/core/plugin_invoker.py at line 488, in case the FileNotFoundError is raised and then your custom exception (ExecutableNotFoundError) assumes this was a problem with the plugin executable. however the issue was with my configuration because in my docker image i was copying the dbt project at the wrong path and the dbt plugin couldn't find my dbt code, not the dbt executable itself.
To test this i changed this snippet (lines 485-491)
try:
yield (popen_args, popen_options, popen_env)
except FileNotFoundError as err:
raise ExecutableNotFoundError(
self.plugin,
self.plugin.executable,
) from err
adding a print for the original exception message
try:
yield (popen_args, popen_options, popen_env)
except FileNotFoundError as err:
logger.error(f"FILENOTFOUNDERROR DURING YIELD/EXECUTION: {err}")
raise ExecutableNotFoundError(
self.plugin,
self.plugin.executable,
) from err
and indeed I could see the original error was
FILENOTFOUNDERROR DURING YIELD/EXECUTION: [Errno 2] No such file or directory: '/project/ingestion/../transformation/dbt'
so this was my dbt code not being found, not the dbt executableDaniele Tarek Iaisy
09/10/2025, 1:45 PMFileNotFoundError exception should probably be handled a bit differently, at least including the original error message inside ExecutableNotFoundError because now it can hide the real issue and be missleadingvisch
09/10/2025, 6:13 PMEdgar Ramírez (Arch.dev)
09/18/2025, 4:39 PMEdgar Ramírez (Arch.dev)
09/20/2025, 8:50 PMDaniele Tarek Iaisy
09/23/2025, 7:50 AM