embulk-input-postgresql 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9c87767c5c72bf9ad8fb4292916be3daa3c99c7
4
- data.tar.gz: a16d44ad3289d71b31a19ddaa543acd980f0d3c8
3
+ metadata.gz: 36e483eaadb50c1495f7ca4af1e39b35b9fe53c3
4
+ data.tar.gz: 438714d06d86d73a47b107e1d9c6a013a68b56f5
5
5
  SHA512:
6
- metadata.gz: 106f08c0ccdac1fe0fd27b4b05a76f900149f94f7d5f66f98df40f4081294e527096c091142309fd7035cf899ba4c48d01605e6596545a191971c1765b17ac7e
7
- data.tar.gz: c3e34e3f61e56abeec9d38d2eec1ee1518fcd4d90e64af90e436fdbd708b44e9fe4fd8b76a74c125ad80d3df32e6974c9a06ddcdb13c5800424c804269ca8b9b
6
+ metadata.gz: 2d899f67bc54eac6cb39578f939d46f216bb09484d20be08979658c767a6a8419fc9a7f6f26da17fdb4a26a5ce311b5c8f7ab315d8da8e57755fd5b147c2cbf6
7
+ data.tar.gz: 07c6da64532ed9b5a9bdccfe15cd7de84351859839ae08fa6cccf858e085f9504fed8cb73ed603d7dfca78a976540bbb054e64c39d5a17d67bd616dfa05e2b20
data/README.md CHANGED
@@ -15,11 +15,14 @@ PostgreSQL input plugins for Embulk loads records from PostgreSQL.
15
15
  - **password**: database login password (string, default: "")
16
16
  - **database**: destination database name (string, required)
17
17
  - **schema**: destination schema name (string, default: "public")
18
- - **table**: destination table name (string, required)
19
- - **select**: comma-separated list of columns to select (string, default: "*")
20
- - **where**: WHERE condition to filter the rows (string, default: no-condition)
21
18
  - **fetch_rows**: number of rows to fetch one time (used for java.sql.Statement#setFetchSize) (integer, default: 10000)
22
19
  - **options**: extra JDBC properties (hash, default: {})
20
+ - If you write SQL directly,
21
+ - **query**: SQL to run (string)
22
+ - If **query** is not set,
23
+ - **table**: destination table name (string, required)
24
+ - **select**: comma-separated list of columns to select (string, default: "*")
25
+ - **where**: WHERE condition to filter the rows (string, default: no-condition)
23
26
 
24
27
  ## Example
25
28
 
@@ -35,6 +38,22 @@ in:
35
38
  where: "col4 != 'a'"
36
39
  ```
37
40
 
41
+ If you need a complex SQL,
42
+
43
+ ```yaml
44
+ in:
45
+ type: postgresql
46
+ host: localhost
47
+ user: myuser
48
+ password: ""
49
+ database: my_database
50
+ query: |
51
+ SELECT t1.id, t1.name, t2.id AS t2_id, t2.name AS t2_name
52
+ FROM table1 AS t1
53
+ LEFT JOIN table2 AS t2
54
+ ON t1.id = t2.t1_id
55
+ ```
56
+
38
57
  ## Build
39
58
 
40
59
  ```
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-postgresql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-28 00:00:00.000000000 Z
11
+ date: 2015-03-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Selects records from a table.
14
14
  email:
@@ -22,8 +22,8 @@ files:
22
22
  - lib/embulk/input/postgresql.rb
23
23
  - src/main/java/org/embulk/input/PostgreSQLInputPlugin.java
24
24
  - src/main/java/org/embulk/input/postgresql/PostgreSQLInputConnection.java
25
- - classpath/embulk-input-jdbc-0.3.0.jar
26
- - classpath/embulk-input-postgresql-0.3.0.jar
25
+ - classpath/embulk-input-jdbc-0.4.0.jar
26
+ - classpath/embulk-input-postgresql-0.4.0.jar
27
27
  - classpath/jna-4.1.0.jar
28
28
  - classpath/jna-platform-4.1.0.jar
29
29
  - classpath/postgresql-9.4-1200-jdbc41.jar