julian_knight
07/07/2022, 10:33 PMjobs:
- name: gitlab
tasks:
- dbt-postgres:seed
- tap-gitlab target-postgres
- dbt-postgres:snapshot
- dbt-postgres:run
- dbt-postgres:test
meltano run gitlab will run all the dbt commands for the whole project rather than allowing me to specify only the specific models that have changed (e.g. DBT_MODELS=+gitlab+ ).
I realize this can be solved by schedules:
schedules:
- name: gitlab
interval: '@daily'
job: gitlab
env:
DBT_MODELS: +gitlab+
However it seems to me that this information belongs to the job itself, not the schedule; that is even if I were to manually run meltano run gitlab outside of the @daily schedule, I’d still expect it to apply my configuration. Would it make sense for jobs to have envs?taylor
07/08/2022, 1:58 PMenvironment context because it's not really for the specific environment, it's for the schedule.
If you had env at both the environment and the schedule, would you expect the schedule env to take precedence?
https://github.com/meltano/meltano/issues/6179 is a related issue, but if you could pop a new one for adding env as a supported extra on schedules that'd be great!julian_knight
07/08/2022, 3:21 PMjulian_knight
07/08/2022, 3:31 PMtaylor
07/08/2022, 5:56 PMI would think the schedule takes precedence over the jobThat's what I would argue for as well, but I think I mis understood your comment in the issue. I replied with my proposal but forgot to tag you