Hey folks, I’m testing out the new jobs setup on o...
# troubleshooting
j
Hey folks, I’m testing out the new jobs setup on our project. Simple example:
Copy code
jobs:
- 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:
Copy code
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?
t
@julian_knight I think that could make sense. Presumably you wouldn't want to set the variable in the
environment
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!
j
I would think the schedule takes precedence over the job
t
I would think the schedule takes precedence over the job
That'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