Embedding variables in config file
See original GitHub issueIn addition to #206, this idea makes it possible to embed variables in config file. Unlike #206, this idea is based on text processing. Embulk reads a config file, and apply a template engine such as ERB, and load the generated file using YAML. It also means that variables don’t have types (all variables are text).
Here is an example:
variables: # declare variables in a config file
myval: 1
plugin_variables: # run an input plugin, and use the last (or first) row as variables
type: postgresql
query: select max(id) as max_id from access
database: production
host: pg_analyze
---
in:
type: mysql
query: select id, host, ip from access_source where ${max_id} < id
database: production
host: my_tran
out:
type: postgresql
table: access
database: production
host: pg_analyze
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Want to use env variables in that config file? Well, you can ...
Meet the envsubst command. With envsubst we can embed the value of environment variables inside a string that comes from the standard input....
Read more >Variables loaded from config files - Smarty Template Engine
Variables that are loaded from the config files are referenced by enclosing them within #hash marks# , or with the smarty variable $smarty.config...
Read more >Using variables in configuration files - IBM
Specify a variable in the bootstrap. properties file. Use a defined variable in the configuration. Use variable element in the configuration.
Read more >Use environment variables in the configuration - Elastic
You can use environment variable references in the config file to set values that need to be configurable during deployment. To do this,...
Read more >Using envsubst to Merge Environment Variables into Config ...
This command is available on Linux and macOC by default and it lets you template out files with ENV vars to create dynamic...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, @doctor. You can use the Liquid template engine. See the detail Using variables https://www.embulk.org/docs/built-in.html#embulk-configuration-file-format
thank you @hiroyuki-sato looking forward to use digdag.