Hi everyone I'm a bit new to meltano SDK I'm tryi...
# meltano-plugin-development
h
Hi everyone I'm a bit new to meltano SDK I'm trying to build a custom tap for one of my requirements and I'm trying to understand how to implement custom environment variables utilisation with meltano SDK.can anyone provide any insights?
e
Hi @Haruno izumi! Can you say more about your use case? The SDK automatically detects environment variables for top-level settings, see https://sdk.meltano.com/en/v0.37.0/implementation/cli.html#config-env.
h
Hi @Edgar Ramírez (Arch.dev) thanks for the response! My usecase is if I have a .env file or config.env file where I need to add the all required secret for my custom tap..how the meltano SDK will access those variables and can able utilizes them for example I have added client_id as env variable and I need to use this Id while calling the api using cookie cutter template
e
The sdk parses declared settings in a specific format. An example is probably most useful: • if your tap's name (defined in the
Tap*
class) is
tap-example
and has a declared
client_id
setting, then running
tap-example --config=ENV
will look for
TAP_EXAMPLE_CLIENT_ID
both in the process environment and the
.env
file present in the working directory.