Hi everyone! I'm trying to build a custom tap, and...
# plugins-general
d
Hi everyone! I'm trying to build a custom tap, and I'm struggling to understand how Meltano passes configs to a tap when they are stored in env variables (to store sensitive configs). Reading Singer spec, they only say we need to use a config.json file. So how does Meltano convert my env vars to a file readable by a tap? Is there any docs on how to name these env vars?
p
Hey @delson_barros - awesome! Also feel free to post in #C01PKLU5D1R with development specific questions. Meltano does use the config.json that you mentioned, which is outlined in more detail here https://hub.meltano.com/singer/spec#config-files. Meltano does the work of translating your environment variables and meltano.yml settings into an appropriate config.json prior to running the tap/target sync (same with the catalog and state files too), then it cleans those files up after the sync is complete. If you want to see what the config would look like you can run something like
meltano elt --dump=extractor-config tap-x target-y
which will print your config file based on your current settings
d
Thank you for your prompt reply, @pat_nadolny! So, I often see that environment variables are written following a pattern: If I have • config name: api_key the corresponding environment variable is • env var: TAP_[MY_TAP_NAME]_API_KEY Is this pattern standardized by Meltano? (I didn't find it in the docs)
p
@delson_barros yes its standardized within Meltano! Check out this out for more details https://docs.meltano.com/guide/configuration#configuring-settings
d
@pat_nadolny, thank you so much!! This will help me a lot