elementary
elementary copied to clipboard
[ELE-1628] Call `dbt deps` on Dockerfile instead of running it on the `edr` run.
Is your feature request related to a problem? Please describe.
Running dbt deps on the container run creates network I/O which for some users is problematic and also slows down the execution time.
Describe the solution you'd like
Run dbt deps as part of the Dockerfile.
The solution should probably be:
ELEMENTARY_PKG_LOCATION=$(pip show elementary-data | grep -i location | awk '{print $2}')
ELEMENTARY_DBT_PROJECT_PATH="$ELEMENTARY_PKG_LOCATION/elementary/monitor/dbt_project"
dbt deps --project-dir "$ELEMENTARY_DBT_PROJECT_PATH"
Or reading this variable via Python code.
heya @elongl, did a PR for this request, please see #1296, any feedback would be appreciated, thanks.