Last active
September 1, 2017 05:52
-
-
Save machuz/6b7743a7f3ec27ac9c1a5a2ddeb0b3a6 to your computer and use it in GitHub Desktop.
embulk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## db/_dev.yml.liquid | |
type: mysql | |
host: 127.0.0.1 | |
user: user | |
password: password | |
database: embulk_test | |
## query/_query.yml.liquid | |
query: | | |
select * from {{ target_table }} | |
## config/cfg.yml.liquid | |
in: | |
{% if env.EMBULK_ENV == 'production' %}{% include 'db/prod' %} | |
{% else if env.EMBULK_ENV == 'staging' %}{% include 'db/stg' %} | |
{% else %}{% include 'db/dev' %} | |
{% endif %} | |
{% include 'query/query', | |
target_table: 'auto_inc_test' %} | |
out: {type: stdout} | |
configディレクトリの親ディレクトリで実行 | |
コンフィグはembulk実行ディレクトリ直下でないといけない?? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## db/_dev.yml.liquid(先頭にスペースなし) | |
type: mysql | |
host: 127.0.0.1 | |
user: user | |
password: password | |
database: embulk_test | |
## query/_query.yml.liquid | |
query: | | |
select * from {{ target_table }} | |
## cfg.yml.liquid | |
in: | |
{% if env.EMBULK_ENV == 'production' %} | |
{% include 'db/prod' %} | |
{% else if env.EMBULK_ENV == 'staging' %} | |
{% include 'db/stg' %} | |
{% else %} | |
{% include 'db/dev' %} | |
{% endif %} | |
{% include 'query/query', | |
target_table: 'auto_inc_test' %} | |
out: {type: stdout} | |
includeでインデントするとおかしくなる?? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## db/_dev.yml.liquid(先頭にスペース有り) | |
type: mysql | |
host: 127.0.0.1 | |
user: user | |
password: password | |
database: embulk_test | |
## query/_query.yml.liquid | |
query: | | |
select * from {{ target_table }} | |
## cfg.yml.liquid | |
in: | |
{% if env.EMBULK_ENV == 'production' %}{% include 'db/prod' %} | |
{% else if env.EMBULK_ENV == 'staging' %}{% include 'db/stg' %} | |
{% else %}{% include 'db/dev' %} | |
{% endif %} | |
{% include 'query/query', | |
target_table: 'auto_inc_test' %} | |
out: {type: stdout} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment