elementary icon indicating copy to clipboard operation
elementary copied to clipboard

[ELE-1628] Call `dbt deps` on Dockerfile instead of running it on the `edr` run.

Open elongl opened this issue 2 years ago • 2 comments

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.

ELE-1628

elongl avatar Aug 23 '23 07:08 elongl

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.

elongl avatar Aug 23 '23 07:08 elongl

heya @elongl, did a PR for this request, please see #1296, any feedback would be appreciated, thanks.

yimingpeng avatar Nov 26 '23 04:11 yimingpeng