nevin_morgan
08/11/2020, 3:11 PMdouwe_maan
08/11/2020, 3:50 PMmeltano config <plugin> using both config.json (in the case of taps and targets) and env vars (matching the names listed under meltano config <plugin> list ), and within a meltano elt pipeline, the loader and the transformer have access to extractor and loader config through these special pipeline environment variables: https://meltano.com/docs/command-line-interface.html#pipeline-environment-variablesnevin_morgan
08/11/2020, 3:57 PMdouwe_maan
08/11/2020, 4:23 PMPluginInvoker.prepare() : https://gitlab.com/meltano/meltano/-/blob/master/src/meltano/core/plugin_invoker.py#L93 followed by PluginInvoker.invoke(*args) : https://gitlab.com/meltano/meltano/-/blob/master/src/meltano/core/plugin_invoker.py#137
prepare sets self.plugin_config_processed to the exact same JSON object you see when you run meltano config <plugin> , after which it calls the configure hook on the plugin, and then the ConfigService.configure() : https://gitlab.com/meltano/meltano/-/blob/master/src/meltano/core/plugin/config_service.py
Singer taps and targets implement the before_configure hook to dump invoker.plugin_config_processed into a JSON file at .meltano/<type>/<name>/tap.config.json : https://gitlab.com/meltano/meltano/-/blob/master/src/meltano/core/plugin/singer/base.py#L26
ConfigService.configure() then copies config files from .meltano/<type>/<name to `.meltano/run/<plugin>`: https://gitlab.com/meltano/meltano/-/blob/master/src/meltano/core/plugin/config_service.py#L44
Finally, PluginInvoker.invoke() calls the plugin's exec_args() method to determine the args to call the executable with: https://gitlab.com/meltano/meltano/-/blob/master/src/meltano/core/plugin_invoker.py#L119, which in the case of Singer taps and targets adds the --config flag and the config file path: https://gitlab.com/meltano/meltano/-/blob/master/src/meltano/core/plugin/singer/tap.py#L84douwe_maan
08/11/2020, 4:25 PM