Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * PostgreSQL 9.4.5
- * OS: OSX 10.11
- ```
- select * from 日本語;
- 主キー | 名前
- -----------+-----------------------
- 1 | やまだたろう
- 2 | やまかわしろう
- (2 rows)
- ```
- ```yaml
- in:
- type: postgresql
- host: localhost
- database: dbname
- table: "日本語"
- user: user
- password: pass
- #query: "select 主キー,名前 from 日本語"
- #out:
- # type: stdout
- out:
- type: file
- path_prefix: out
- file_ext: csv
- formatter:
- type: csv
- ```
- ```
- embulk run hoge.yml
- 2016-02-23 10:59:01.740 +0900: Embulk v0.8.5
- 2016-02-23 10:59:04.207 +0900 [INFO] (0001:transaction): Loaded plugin embulk-input-postgresql (0.6.4)
- 2016-02-23 10:59:04.411 +0900 [INFO] (0001:transaction): SQL: SET search_path TO "public"
- 2016-02-23 10:59:04.424 +0900 [INFO] (0001:transaction): SQL: SELECT * FROM "日本語"
- 2016-02-23 10:59:04.527 +0900 [INFO] (0001:transaction): Using local thread executor with max_threads=8 / output tasks 4 = input tasks 1 * 4
- 2016-02-23 10:59:04.619 +0900 [INFO] (0001:transaction): {done: 0 / 1, running: 0}
- 2016-02-23 10:59:04.690 +0900 [INFO] (0017:task-0000): Writing local file 'out000.00.csv'
- 2016-02-23 10:59:04.694 +0900 [INFO] (0017:task-0000): Writing local file 'out001.00.csv'
- 2016-02-23 10:59:04.696 +0900 [INFO] (0017:task-0000): Writing local file 'out002.00.csv'
- 2016-02-23 10:59:04.698 +0900 [INFO] (0017:task-0000): Writing local file 'out003.00.csv'
- 2016-02-23 10:59:04.768 +0900 [INFO] (0017:task-0000): SQL: SET search_path TO "public"
- 2016-02-23 10:59:04.770 +0900 [INFO] (0017:task-0000): SQL: DECLARE cur NO SCROLL CURSOR FOR SELECT * FROM "日本語"
- 2016-02-23 10:59:04.780 +0900 [INFO] (0017:task-0000): SQL: FETCH FORWARD 10000 FROM cur
- 2016-02-23 10:59:04.782 +0900 [INFO] (0017:task-0000): > 0.00 seconds
- 2016-02-23 10:59:04.796 +0900 [INFO] (0017:task-0000): SQL: FETCH FORWARD 10000 FROM cur
- 2016-02-23 10:59:04.797 +0900 [INFO] (0017:task-0000): > 0.00 seconds
- 2016-02-23 10:59:04.802 +0900 [INFO] (0001:transaction): {done: 1 / 1, running: 0}
- 2016-02-23 10:59:04.883 +0900 [INFO] (main): Committed.
- 2016-02-23 10:59:04.888 +0900 [INFO] (main): Next config diff: {"in":{},"out":{}}
- ```
- cat out000.00.csv
- ```
- 主キー,名前
- 1,やまだたろう
- 2,やまかわしろう
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement