Hello. I am using the invoke command on a xero-tap...
# getting-started
a
Hello. I am using the invoke command on a xero-tap, so I can pass the config file for automatic updating of the refresh token. Is there a way I can set the invoke command as a job? (currently getting a 'block invoke not found' error, as the job appears to only accept run commands?). Any help/direction appreciated. Thanks
e
meltano run
(and the
jobs
array) expects the tap to be paired with a target. I'm curious why you need to setup a job, are you using an orchestrator like Airflow to generate tasks for each Meltano job?
a
Hi. Yes, I wanted to use Airflow to run a pipeline on a schedule. Maybe I need to create a custom DAG and use BashOperator directly instead of using meltano DAG generator? (I have one pipeline where I need to use invoke and then cat the output to a target in two steps)
v
env variables is probably the easiest way to go re https://docs.meltano.com/guide/configuration/#configuring-settings
When we hit this for a tap or two we just stored the refresh token in a file that was persistent between runs. A secret source would be even better but 🤷 we didn't have the need for it
a
Thx @visch . Looks helpful reference. The refresh token is updated by the tap API on every call. Did you find a way to update the env variables based on the API response? (Each API call gives you a new one time refresh token to use on next API call). There is a short grace period to reuse the ā€œonetimeā€ request token, but we only run pipelines daily. The xero singer tap updates the config file if you send one in as the argument , which is why we have fallen back to using invoke.
v
however you're currently doing it with the config file you can do it with an env var 🤷
a
The singer tap we are using is configured to take a config file as argument and writes changes back to it, so there is no option to use env variable without hand rolling our own plugin. However, you have set me thinking, particularly as we want to have AES encryption on the env variable too. Thank you for taking the time to respond.