stephen_bailey
08/24/2021, 12:56 AMmeltano schedule my-random-python-script
, right?taylor
08/24/2021, 1:57 PMexecutable
for a schedule and have it run that. Right now you would just create a DAG yourself and run it there. Want to open an issue on that? 🙂stephen_bailey
08/24/2021, 4:45 PM./orchestrators/my_dag.py
2. run meltano schedule <executable_name> --executable 'airflow dags trigger my_dag'
that would create a new scheduled task that would run the executable?taylor
08/24/2021, 5:32 PMmeltano schedule [SCHEDULE_NAME] [random_python_executable] [INTERVAL]
I think that would be the better way given the current model. Since we're dynamically generating the dags in https://gitlab.com/meltano/files-airflow/-/blob/master/bundle/orchestrate/dags/meltano.py we could just have one that looks for an executable
type (or something other name) and just runs thattaylor
08/24/2021, 5:32 PMstephen_bailey
08/24/2021, 8:09 PMstephen_bailey
08/24/2021, 8:11 PMmeltano schedule great-expectations 'great-expectations --arg foo'
(just as an example of a useful thing to orchestrate alongside elt)stephen_bailey
08/24/2021, 8:16 PMtaylor
08/24/2021, 9:03 PMkevin
01/12/2022, 7:23 PMtest.sh
that has something simple like an echo command, if i add that to the meltano.yml
like so:
- name: meltano-sh
namespace: meltano_sh
executable: <PATH_TO_test.sh>
capabilities: [[]]
config:
username: admin
user_agent: Meltano shell script
and run meltano schedule meltano2 meltano-sh target-jsonl "* * * * *"
that should work? (for simplicity)kevin
01/12/2022, 7:25 PMkevin
01/12/2022, 7:28 PM2022-01-12T19:13:18.017354Z [info ] ascii passed initial chaos probing. Mean measured chaos is 0.300000 %
2022-01-12T19:13:18.018037Z [info ] ascii is most likely the one. Stopping the process.
2022-01-12T19:13:18.576787Z [info ] Running extract & load... job_id=meltano3 name=meltano run_id=47e14570-7609-4050-bc3e-9d5ca3a26943
2022-01-12T19:13:18.592584Z [info ] ELT could not be completed: Cannot start extractor: unhashable type: 'list' cmd_type=elt job_id=meltano3 name=meltano run_id=47e14570-7609-4050-bc3e-9d5ca3a26943 stdio=stderr
taylor
01/12/2022, 7:35 PM--log-level=debug
? cc @florian.hineskevin
01/12/2022, 7:35 PM#!/bin/sh
echo hello!
kevin
01/12/2022, 7:36 PMtaylor
01/12/2022, 7:37 PMkevin
01/12/2022, 7:42 PM- name: meltano-sh
namespace: meltano_sh
executable: <PATH_TO_test.sh>
capabilities: [[]]
config:
username: admin
user_agent: Meltano shell script
to the extractors portion of meltano.yml
florian.hines
01/12/2022, 7:45 PM--log-level=debug
on it, you'll get a traceback - I was able to repro it:florian.hines
01/12/2022, 7:46 PM2022-01-12T19:44:37.170099Z [debug ] ELT could not be completed: Cannot start extractor: unhashable type: 'list'
Traceback (most recent call last):
File "/Users/syn/projects/meltano/src/meltano/core/runner/singer.py", line 64, in invoke
p_tap = await tap.invoke_async(
File "/Users/syn/projects/meltano/src/meltano/core/plugin_invoker.py", line 277, in invoke_async
async with self._invoke(*args, **kwargs) as (
File "/Users/syn/.pyenv/versions/3.8.12/envs/melty-3.8/lib/python3.8/site-packages/async_generator/_util.py", line 34, in __aenter__
return await self._agen.asend(None)
File "/Users/syn/projects/meltano/src/meltano/core/plugin_invoker.py", line 262, in _invoke
async with self.plugin.trigger_hooks("invoke", self, args):
File "/Users/syn/.pyenv/versions/3.8.12/envs/melty-3.8/lib/python3.8/site-packages/async_generator/_util.py", line 34, in __aenter__
return await self._agen.asend(None)
File "/Users/syn/projects/meltano/src/meltano/core/behavior/hookable.py", line 87, in trigger_hooks
await self.__class__.trigger(self, f"before_{hook_name}", *args, **kwargs)
File "/Users/syn/projects/meltano/src/meltano/core/behavior/hookable.py", line 115, in trigger
raise err
File "/Users/syn/projects/meltano/src/meltano/core/behavior/hookable.py", line 107, in trigger
await hook_func(target, *args, **kwargs)
File "/Users/syn/projects/meltano/src/meltano/core/plugin/singer/tap.py", line 177, in look_up_state_hook
await self.look_up_state(plugin_invoker)
File "/Users/syn/projects/meltano/src/meltano/core/plugin/singer/tap.py", line 185, in look_up_state
if "state" not in plugin_invoker.capabilities:
File "/Users/syn/projects/meltano/src/meltano/core/plugin_invoker.py", line 133, in capabilities
return frozenset(self.plugin.capabilities)
TypeError: unhashable type: 'list'
florian.hines
01/12/2022, 7:47 PMcapabilities: [[]]
)florian.hines
01/12/2022, 7:48 PMkevin
01/12/2022, 7:52 PMmeltano schedule meltano2 meltano-sh target-jsonl "* * * * *"
as id like it to run continuously but seems like its throwing out
```2022-01-12T194946.774813Z [info ] ascii passed initial chaos probing. Mean measured chaos is 0.300000 %
2022-01-12T194946.775257Z [info ] ascii is most likely the one. Stopping the process.
2022-01-12T194947.321201Z [info ] Running extract & load... job_id=meltano3 name=meltano run_id=6d18d55d-dd4c-4028-8834-07b192165b5e
2022-01-12T194947.477192Z [info ] Traceback (most recent call last): cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.477567Z [info ] File "/Users/plotly/Desktop/lane-meltano/.meltano/loaders/target-jsonl/venv/bin/target-jsonl", line 8, in <module> cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.477658Z [info ] sys.exit(main()) cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.477731Z [info ] File "/Users/plotly/Desktop/lane-meltano/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/target_jsonl.py", line 94, in main cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.477812Z [info ] state = persist_messages(input_messages, config.get('destination_path', ''), config.get('do_timestamp_file', True)) cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.477883Z [info ] File "/Users/plotly/Desktop/lane-meltano/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/target_jsonl.py", line 47, in persist_messages cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.477950Z [info ] o = singer.parse_message(message).asdict() cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.478021Z [info ] File "/Users/plotly/Desktop/lane-meltano/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/singer/messages.py", line 156, in parse_message cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.478084Z [info ] obj = json.loads(msg) cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.478148Z [info ] File "/Users/plotly/Desktop/lane-meltano/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/simplejson/__init__.py", line 516, in loads cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.478211Z [info ] return _default_decoder.decode(s) cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.478279Z [info ] File "/Users/plotly/Desktop/lane-meltano/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.478345Z [info ] obj, end = self.raw_decode(s) cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.478410Z [info ] File "/Users/plotly/Desktop/lane-meltano/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-8834-07b192165b5e stdio=stderr
2022-01-12T194947.478477Z [info ] return self.scan_once(s, idx=_w(s, idx).end()) cmd_type=loader job_id=meltano3 name=target-jsonl run_id=6d18d55d-dd4c-4028-88…kevin
01/12/2022, 7:55 PMmeltano invoke yoyo
and seems to work. how would i be able to schedule this? say have it run every hour?
utilities:
- name: yoyo
namespace: yoyo
pip_url: yoyo-migrations
executable: <PATH_TO_TEST.SH>
taylor
01/12/2022, 8:00 PMtaylor
01/12/2022, 8:01 PMkevin
01/12/2022, 8:04 PMmeltano.yml
file like so:
- name: meltano-sh
namespace: meltano_sh
executable: /Users/......./test.sh
config:
username: admin
user_agent: Meltano shell script
and running a schedule command - meltano schedule test meltano-sh target-jsonl "* * * * *"
will not worktaylor
01/12/2022, 8:05 PMmeltano elt
command which can only do extractors/loaders and dbt transformations. https://meltano.com/docs/command-line-interface.html#schedule the new meltano run
command, in preview now, will be the way to go in the future https://meltano.com/docs/command-line-interface.html#runkevin
01/12/2022, 8:17 PMtaylor
01/12/2022, 8:25 PMtaylor
01/12/2022, 8:25 PMaaronsteers
01/12/2022, 8:29 PMkevin
01/13/2022, 8:56 PMorchestrate
folder and ran meltano invoke airflow scheduler
taylor
01/13/2022, 8:57 PM