Advertisement
Guest User

Untitled

a guest
Jul 5th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1.  
  2. ```
  3. .
  4. |-- config.yml.liquid
  5. |-- db
  6. | `-- _conn.yml.liquid
  7. `-- query
  8. `-- _query.yml.liquid
  9.  
  10. ```
  11.  
  12. cat config.yml.liquid
  13.  
  14. ```yaml
  15. in:
  16. {% include 'db/conn' %}
  17. {% include 'query/query' %}
  18. out:
  19. type: stdout
  20. ```
  21.  
  22. db/_conn.yml.liquid
  23.  
  24. ```yaml
  25.  
  26. type: postgresql
  27. host: 127.0.0.1
  28. user: user
  29. password: password
  30. database: embulk_test
  31. ```
  32.  
  33. query/_query.yml.liquid
  34.  
  35. ```yaml
  36.  
  37. query: "select * from auto_inc_test"
  38. ```
  39.  
  40. ## 環境変数で分ける場合
  41.  
  42. ```
  43. in:
  44. {% if env.EMBULK_ENV == 'production' %}
  45. {% include 'db/prod' %}
  46. {% else %}
  47. {% include 'db/dev' %}
  48. {% endif %}
  49. {% include 'query/query' %}
  50. out:
  51. type: stdout
  52.  
  53. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement