k_s
02/16/2022, 10:04 AMtaylor
02/16/2022, 4:50 PMmeltano run command you’d be able to run arbitrary python scripts after dbt generally. so there’s definitely some overlap in functionality.jacob_matson
07/12/2023, 2:05 AMmeltano run ? I'm looking for an example. Thx!!jacob_matson
07/12/2023, 2:14 AMmeltano run tap-gitlab target-postgres simple-job
which is cool! but unclear how to define said simple job in my meltano.yml filetaylor
07/12/2023, 1:46 PMtaylor
07/12/2023, 1:46 PMtaylor
07/12/2023, 1:48 PMpat_nadolny
07/12/2023, 2:25 PMjacob_matson
07/12/2023, 4:52 PMjacob_matson
07/12/2023, 4:52 PMjacob_matson
07/13/2023, 12:35 AMmeltano invoke custom_util:commandjacob_matson
07/13/2023, 12:35 AMjacob_matson
07/13/2023, 12:40 AM- invoke custom_util:commandpat_nadolny
07/13/2023, 2:07 PMmeltano run like meltano run custom_util:command similar to meltano run tap-x target-y dbt-postgres:runjacob_matson
07/13/2023, 2:30 PMtaylor
07/13/2023, 3:04 PMadd it as a shim to dbt for now.I don’t think it needs to be a shim for dbt specifically. you can do
meltano run <tap> <target> custom_util:command or even just meltano run custom_util:commandjacob_matson
07/13/2023, 3:04 PMtaylor
07/13/2023, 3:09 PMpat_nadolny
07/13/2023, 3:18 PMmeltano run dbt-snowflake:my_custom_py_script . Heres an example:
plugins:
utilities:
- name: dbt-snowflake
variant: dbt-labs
pip_url: dbt-core~=1.3.0 dbt-snowflake~=1.3.0 git+<https://github.com/meltano/dbt-ext.git@c6a30cac299184bae9424ccf9db8f41b30b27314>
commands:
my_python_script:
executable: python
args: transform/my_python_script.py
where
transform/my_python_script.py
contains print("Hello!!!") . I run meltano run dbt-snowflake:my_python_script and I get
(meltano) Patricks-MBP:data pnadolny$ meltano run dbt-snowflake:my_python_script
2023-07-13T15:14:37.699304Z [info ] Environment 'userdev' is active
2023-07-13T15:14:38.442054Z [info ] Hello!!! cmd_type=command name=dbt-snowflake stdio=stderr
2023-07-13T15:14:38.445345Z [info ] Block run completed. block_type=InvokerCommand err=None set_number=0 success=Truepat_nadolny
07/13/2023, 3:20 PMjacob_matson
07/13/2023, 3:21 PMjacob_matson
07/13/2023, 3:24 PM