andrew_stewart
09/11/2020, 3:53 PMdouwe_maan
09/11/2020, 4:13 PMandrew_stewart
09/11/2020, 4:18 PMandrew_stewart
09/11/2020, 4:20 PMdouwe_maan
09/11/2020, 4:21 PMmeltano.yml , and to then specify pipeline-specific config values (to change the source S3 bucket or target database) at runtime using env vars.douwe_maan
09/11/2020, 4:21 PMdouwe_maan
09/11/2020, 4:22 PMmeltano schedule , you can use the same extractor in multiple schedules entries, and specify pipeline-specific env vars using the env dictionaryandrew_stewart
09/11/2020, 4:22 PMdouwe_maan
09/11/2020, 4:23 PMmeltano elt tap-foo@profile-bar , meltano elt tap-foo@profile-baz , etc, with those profiles each having their own config dict in meltano.yml , but for the moment env vars are the way to godouwe_maan
09/11/2020, 4:23 PMandrew_stewart
09/11/2020, 4:23 PMandrew_stewart
09/11/2020, 4:24 PMdouwe_maan
09/11/2020, 4:24 PMmeltano elt pipelines?andrew_stewart
09/11/2020, 4:25 PMandrew_stewart
09/11/2020, 4:25 PMdouwe_maan
09/11/2020, 4:26 PMandrew_stewart
09/11/2020, 4:28 PMandrew_stewart
09/11/2020, 4:29 PMdouwe_maan
09/11/2020, 4:31 PMmeltano add orchestrator airflow, meltano schedule <pipeline> , meltano schedule list, and meltano invoke airflow scheduler that's basically what you get! By the time we direct our focus specifically to less technical users who just want to use the UI, we can abstract that away even more and install and run the orchestrator automatically.andrew_stewart
09/11/2020, 4:31 PMdouwe_maan
09/11/2020, 4:32 PMandrew_stewart
09/11/2020, 4:32 PMmeltano elt -all or something similarandrew_stewart
09/11/2020, 4:33 PMdouwe_maan
09/11/2020, 4:34 PMa config file that enumerates every tap/target config combination, which could potentially feed into (or inform) DAG generation.That's https://gitlab.com/meltano/files-airflow/-/blob/master/bundle/orchestrate/dags/meltano.py
As well as potentially then having a variant ofCurrently, that'sor something similarmeltano elt -all
meltano invoke airflow scheduler , but we could have meltano orchestrate : https://gitlab.com/meltano/meltano/-/issues/2231andrew_stewart
09/11/2020, 4:34 PMdouwe_maan
09/11/2020, 4:35 PMandrew_stewart
09/11/2020, 4:35 PMdouwe_maan
09/11/2020, 4:35 PMdouwe_maan
09/11/2020, 4:36 PMwhere in the project can I currently represent those multiple profiles?https://meltano.com/docs/project.html#schedules
douwe_maan
09/11/2020, 4:37 PMWould this basically involve making copies of the DAG?No copying necessary, since that DAG generator already iterates over
meltano schedule list --format=jsonandrew_stewart
09/11/2020, 4:37 PMandrew_stewart
09/11/2020, 4:37 PMandrew_stewart
09/11/2020, 4:38 PMdouwe_maan
09/11/2020, 4:38 PMmeltano schedule schedules can also be managed using meltano ui Pipelines tab, by the way, but the UI does not automatically run the orchestratordouwe_maan
09/11/2020, 4:39 PMmeltano add files docker-compose file bundle starts both UI and scheduler, though: https://gitlab.com/meltano/files-docker-compose/-/blob/master/bundle/docker-compose.ymlandrew_stewart
09/11/2020, 4:39 PMdouwe_maan
09/11/2020, 4:40 PMSo sounds like all the ingredients are there, I just gotta better familiarize myself with the interoperations.And I've got to improve the docs 🙂 But yes, the ingredients are here, and it looks remarkably close to what you were brainstorming already!
douwe_maan
09/11/2020, 4:40 PMandrew_stewart
09/11/2020, 4:41 PMdouwe_maan
09/11/2020, 4:41 PMThanks for your patience with my newbie questions. I’m stoked to try this 🙂Thanks for your feedback! It's really useful to hear what is and isn't obvious to newbies 😄
douwe_maan
09/11/2020, 4:42 PMandrew_stewart
09/11/2020, 5:36 PMandrew_stewart
09/11/2020, 5:37 PMandrew_stewart
09/11/2020, 6:55 PMjob_id from meltano elt is basically the construct I was looking for?andrew_stewart
09/11/2020, 6:56 PMmeltano elt calls w/ different variable overrides, and then register each ‘job’ with a schedule ?douwe_maan
09/11/2020, 8:41 PMie a ‘real world’ projecthttps://gitlab.com/meltano/demo-project is not real, but it does have 2 schedules: https://gitlab.com/meltano/demo-project/-/blob/master/meltano.yml#L71
douwe_maan
09/11/2020, 8:44 PMso you can create multiple pipeline variants viaSchedules are just a way of specifying how you would likecalls w/ different variable overrides, and then register each ‘job’ with a schedule ?meltano elt
meltano elt to be invoked (with specific arguments and environment variables), and when, which the orchestrator is then responsible for actually realizing.
The schedule definition itself needs to specify the arguments and variable overrides, it doesn't look back at an earlier meltano elt run with the same job ID to find them. The job ID is only used to relate different meltano elt runs with each other for purposes of tracking incremental state.douwe_maan
09/11/2020, 8:48 PMmeltano elt "creates a pipeline variant", but it is a valid way of looking at it since it does register the job ID as something you may want to use later, when you run the same conceptual pipeline again.andrew_stewart
09/11/2020, 10:55 PMmeltano elt seems to both 1) register a pipeline and 2) run the pipeline (initial run).douwe_maan
09/11/2020, 11:07 PMmeltano elt), and it allows you to specify a job ID to tag the state with. I get why you're interpreting that tagging as "registering the pipeline", though, since (unless you're using the default timestamped job ID) you are naming the pipeline for later reference.
The pipeline won't exist in meltano.yml or meltano schedule list or Airflow until it's explicitly registered along with its arguments using meltano schedule, though, since running a pipeline once using meltano elt doesn't necessarily mean you want to run it again, even if a job ID was provided.
Do you think this could more intuitive?andrew_stewart
09/11/2020, 11:09 PMdbt where you configure/define the elements of your project and then dbt run the whole project.douwe_maan
09/11/2020, 11:18 PMmeltano elt shouldn't be considered "running the project" or "defining a pipeline", but rather just "running a pipeline" as a one-off action without impact on the project.
The fact that it "registers" the job ID should not be considered "defining an element of the project", since the state and job ID are stored in the system database, which is not considered part of the project since it's environment-specific and not version controlled.
Actually defining the pipeline as an element of your project is done using meltano schedule <name> ... , which modifies meltano.yml and would usually be followed by a Git commit, unlike meltano elt, which doesn't touch the project at all.andrew_stewart
09/11/2020, 11:20 PMdouwe_maan
09/11/2020, 11:21 PMmeltano schedule at all and just call meltano elt with the appropriate arguments directly from BashOperator (or its non-Airflow equivalent). For users already using Airflow or another orchestrator, treating meltano elt as just a CLI they can use to run Singer taps and targets may be more appropriate than to buy into Meltano's idea of explicitly defined pipelines that are expected to picked up by a DAG generator that reads from meltano schedule list --format=json , which is why meltano elt supports a job ID ("extractor state tag") that doesn't need to have been explicitly registered with the project before.douwe_maan
09/11/2020, 11:21 PMIs a project intended to encapsulate a single extractor/loader combo ?Oh no, definitely not, the project is intended to encapsulate all of a team's ELT needs
douwe_maan
09/11/2020, 11:22 PMandrew_stewart
09/11/2020, 11:23 PMdouwe_maan
09/11/2020, 11:28 PMmeltano.yml , every plugin can have a profiles array, where each profile has a name , and its own config object:
extractors:
- name: tap-gitlab
pip_url: git+<https://gitlab.com/meltano/tap-gitlab.git>
config:
projects: meltano/meltano
start_date: '2020-05-01'
profiles:
- name: demo-project
config:
projects: meltano/demo-project
On meltano config, meltano elt, etc, you'd reference that specific profile as tap-gitlab@demo-project , e.g. meltano elt tap-gitlab@demo-project target-snowflake@foo ...andrew_stewart
09/11/2020, 11:29 PMdouwe_maan
09/11/2020, 11:29 PMtap-gitlab@demo-project would be { projects: meltano/demo-project, start_date: '2020-05-01' }andrew_stewart
09/11/2020, 11:29 PMdouwe_maan
09/11/2020, 11:30 PMandrew_stewart
09/11/2020, 11:30 PMandrew_stewart
09/11/2020, 11:32 PMandrew_stewart
09/11/2020, 11:33 PMdouwe_maan
09/11/2020, 11:33 PM--all flag on the proposed meltano schedule run : https://gitlab.com/meltano/meltano/-/issues/2227douwe_maan
09/11/2020, 11:34 PMandrew_stewart
09/11/2020, 11:35 PMdouwe_maan
09/11/2020, 11:35 PMmeltano schedule run --all to run pipelines in parallel, or serially? What if one pipeline fails? What would it log? (Especially if running in parallel!)douwe_maan
09/11/2020, 11:36 PMdouwe_maan
09/11/2020, 11:36 PMandrew_stewart
09/11/2020, 11:36 PMandrew_stewart
09/11/2020, 11:37 PMdouwe_maan
09/11/2020, 11:38 PMdouwe_maan
09/11/2020, 11:38 PMdouwe_maan
09/11/2020, 11:38 PMandrew_stewart
09/11/2020, 11:39 PMdouwe_maan
09/11/2020, 11:40 PMandrew_stewart
09/11/2020, 11:46 PMdbt run), I suppose what you could actually do is eventually have a meltano run command that fires up the docker-compose complete with the Meltano UI, orchestrator of choice, etc etc etc. Basically a ‘main switch’.andrew_stewart
09/11/2020, 11:51 PMUnless one pipeline depends on another, of course
But that’s not something Meltano currently has a concept of anywayThat’s a really interesting idea, and I imagine already possible just through manipulating an existing DAG.
andrew_stewart
09/11/2020, 11:59 PMmeltano dependency [schedule1] [schedule2] (or something like that).
Examples of declarative DAGs in Airflow:
• https://github.com/etsy/boundary-layer
• https://medium.com/@nbrgil/airflow-with-yaml-dags-and-kubernetes-operator-ee9594b96714