Closed fannywiryana closed 11 months ago
Conversation continued in Slack: https://dagster.slack.com/archives/C01U954MEER/p1662587709737289?thread_ts=1662463253.943799&cid=C01U954MEER
Hi, I am also getting this error and can't figure it out as it works locally when running dagit
but not when I deploy to Dagster Cloud.
I can't open up the Slack message - is there any follow up or resolution to this?
@yuhan don't know if this helps, but was running a multi-repo local setup with a workspace.yaml in one repo pointing to another repo with dbt assets, and I got this error. It seems that the dbt
command is expected to be present in the virtual environment where dagit
is running, and not the one with the dbt
assets. This is not a problem for me, but I could imagine this could be an issue if you need to manage multiple repos with different dbt versions?
edit: to be clear, my fix was to install dbt
in the project with the workspace.yaml
.
@Bonnevie can you provide a workspace.yaml example with the dbt project inserted?
Hello,
I have observed the same issue (dagster 1.3.14) when trying to run the assets_dbt_python example on an EC2 instance.
Several code locations are defined in a workspace.yml
file.
dagster-webserver
and dagster-daemon
are run as systemd units.
/lib/systemd/system/dagster-webserver.service
:
[Unit]
Description=Dagster Webserver (Dagster Web UI)
After=network.target
[Service]
Type=simple
User=dagster
EnvironmentFile=/etc/sysconfig/dagster
ExecStart=/opt/dagster/venv/bin/dagster-webserver -h 0.0.0.0 -p 3000 -w /opt/dagster/app/workspace.yml
Restart=always
WorkingDirectory=/opt/dagster/app/
[Install]
WantedBy=multi-user.target
/lib/systemd/system/dagster-daemon.service
:
[Unit]
Description=dagster-daemon (handle Dagster schedules, sensors and run queueing)
After=network.target
[Service]
Type=simple
User=dagster
EnvironmentFile=/etc/sysconfig/dagster
ExecStart=/opt/dagster/venv/bin/dagster-daemon run -w /opt/dagster/app/workspace.yml
Restart=always
WorkingDirectory=/opt/dagster/app/
[Install]
WantedBy=multi-user.target
My workspace.yml is as follows:
# /opt/dagster/app/workspace.yml
load_from:
- python_file:
relative_path: assets_s3_sensor.py
- python_file:
relative_path: assets_schedule.py
- python_module:
module_name: xyz_demo
working_directory: xyz-demo
- python_module:
module_name: assets_dbt_python # as in dagster Git repo examples/assets_dbt_python
working_directory: assets_dbt_python
executable_path: assets_dbt_python/venv/bin/python
My code locations are in /opt/dagster/app/
:
# tree -L 2 /opt/dagster/app/
/opt/dagster/app/
|-- __pycache__
|-- assets_dbt_python
| |-- README.md
| |-- assets_dbt_python
| |-- assets_dbt_python_tests
| |-- dagster_cloud.yaml
| |-- dbt_project
| |-- pyproject.toml
| |-- requirements.in
| |-- requirements.txt
| |-- setup.cfg
| |-- setup.py
| |-- tox.ini
| `-- venv # <-- dbt is installed in this venv!
|-- assets_s3_sensor.py
|-- assets_schedule.py
|-- xyz-demo
| |-- xyz_demo
| |-- xyz_demo_tests
| |-- pyproject.toml
| |-- setup.cfg
| `-- setup.py
`-- workspace.yml
For assets_dbt_python
, I expected that the dbt
from /opt/dagster/app/assets_dbt_python/venv/bin/
can be used but this is not the case.
As explained by @Bonnevie, a workaround is to add dbt command in the PATH of dagster-webserver but this is a little bit misleading and may cause issues if different dbt versions are present in other code locations.
cc @rexledesma getting this on your radar.
Resolved by https://github.com/dagster-io/dagster/pull/17171, if the user wants to completely configure the path to their dbt executable.
Dagster version
0.15.8
What's the issue?
DBT project path is not found when I deploy the repo, but it worked in my local. Hence, I don't know how to reproduce the issue. This is the error message.
I have this in my code
What did you expect to happen?
dbt_repository can be loaded well
How to reproduce?
No response
Deployment type
Other
Deployment details
we build it into GCP cloud compute engine by running some sh script.
Additional information
this is installed in requirements.txt file
dagit==0.15.8 dagster==0.15.8 dagster-airbyte==0.15.8 dagster-cron==0.11.16 dagster-dbt==0.15.8 dagster-graphql==0.15.8 dagster-pandas==0.15.8 dagster-postgres==0.15.8 dagster-slack==0.15.8 db-dtypes==1.0.2 dbt-bigquery==1.2.0 dbt-core==1.2.0 dbt-extractor==0.4.1 dbt-postgres==1.2.0
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.