embulk-output-redshift 0.7.10 → 0.7.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/classpath/{embulk-output-jdbc-0.7.10.jar → embulk-output-jdbc-0.7.11.jar} +0 -0
- data/classpath/{embulk-output-postgresql-0.7.10.jar → embulk-output-postgresql-0.7.11.jar} +0 -0
- data/classpath/{embulk-output-redshift-0.7.10.jar → embulk-output-redshift-0.7.11.jar} +0 -0
- data/src/main/java/org/embulk/output/redshift/RedshiftOutputConnection.java +8 -7
- metadata +5 -7
- data/classpath/embulk-core-0.8.9.jar +0 -0
- data/classpath/msgpack-core-0.8.7.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d64af8464bfac5a262069e316fa1227072de6322
|
4
|
+
data.tar.gz: 4b17ad7085953c573fcc56186c5ab1ca93cec8ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8d003c33121591debba7c54e942026caa25dfe9f2cf64622f1dd66cfbf8828b8639b149391497bb99659125050dbef00d4ff508beb32d91d401861a239dacc9
|
7
|
+
data.tar.gz: 765d334d8521f215d1165b82800bdd5ad3b25f3471fa86f22b4d0676670ada1ab72be25f4bafb87ab97903aa27a7d7173da0cf71830342709703eb88db9073c1
|
data/README.md
CHANGED
@@ -98,7 +98,7 @@ Redshift output plugin for Embulk loads records to Redshift.
|
|
98
98
|
* Transactional: Yes.
|
99
99
|
* Resumable: No.
|
100
100
|
* **merge**:
|
101
|
-
* Behavior: This mode writes rows to some intermediate tables first. If all those tasks run correctly, inserts records from intermediate tables after
|
101
|
+
* Behavior: This mode writes rows to some intermediate tables first. If all those tasks run correctly, inserts new records from intermediate tables after updating records whose keys exist in intermediate tables. Namely, if merge keys of a record in the intermediate tables already exist in the target table, the target record is updated by the intermediate record, otherwise the intermediate record is inserted. If the target table doesn't exist, it is created automatically.
|
102
102
|
* Transactional: Yes.
|
103
103
|
* Resumable: Yes.
|
104
104
|
|
Binary file
|
Binary file
|
Binary file
|
@@ -200,22 +200,23 @@ public class RedshiftOutputConnection
|
|
200
200
|
}
|
201
201
|
sb.append(" FROM ");
|
202
202
|
quoteTableIdentifier(sb, fromTables.get(i));
|
203
|
-
sb.append(" WHERE NOT EXISTS (SELECT 1 FROM ");
|
204
|
-
quoteTableIdentifier(sb, toTable);
|
205
|
-
sb.append(", ");
|
206
|
-
quoteTableIdentifier(sb, fromTables.get(i));
|
207
|
-
sb.append(" WHERE ");
|
208
203
|
|
204
|
+
sb.append(" WHERE (");
|
209
205
|
for (int k = 0; k < mergeKeys.size(); k++) {
|
210
|
-
if (k != 0) { sb.append("
|
206
|
+
if (k != 0) { sb.append(", "); }
|
211
207
|
quoteTableIdentifier(sb, fromTables.get(i));
|
212
208
|
sb.append(".");
|
213
209
|
quoteIdentifierString(sb, mergeKeys.get(k));
|
214
|
-
|
210
|
+
}
|
211
|
+
sb.append(") NOT IN (SELECT ");
|
212
|
+
for (int k = 0; k < mergeKeys.size(); k++) {
|
213
|
+
if (k != 0) { sb.append(", "); }
|
215
214
|
quoteTableIdentifier(sb, toTable);
|
216
215
|
sb.append(".");
|
217
216
|
quoteIdentifierString(sb, mergeKeys.get(k));
|
218
217
|
}
|
218
|
+
sb.append(" FROM ");
|
219
|
+
quoteTableIdentifier(sb, toTable);
|
219
220
|
sb.append(")) ");
|
220
221
|
}
|
221
222
|
sb.append(";");
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-redshift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Inserts or updates records to a table.
|
14
14
|
email:
|
@@ -25,16 +25,14 @@ files:
|
|
25
25
|
- classpath/aws-java-sdk-sts-1.10.77.jar
|
26
26
|
- classpath/commons-codec-1.6.jar
|
27
27
|
- classpath/commons-logging-1.1.3.jar
|
28
|
-
- classpath/embulk-
|
29
|
-
- classpath/embulk-output-
|
30
|
-
- classpath/embulk-output-
|
31
|
-
- classpath/embulk-output-redshift-0.7.10.jar
|
28
|
+
- classpath/embulk-output-jdbc-0.7.11.jar
|
29
|
+
- classpath/embulk-output-postgresql-0.7.11.jar
|
30
|
+
- classpath/embulk-output-redshift-0.7.11.jar
|
32
31
|
- classpath/embulk-util-aws-credentials-0.2.8.jar
|
33
32
|
- classpath/httpclient-4.3.6.jar
|
34
33
|
- classpath/httpcore-4.3.3.jar
|
35
34
|
- classpath/jackson-dataformat-cbor-2.5.3.jar
|
36
35
|
- classpath/jcl-over-slf4j-1.7.12.jar
|
37
|
-
- classpath/msgpack-core-0.8.7.jar
|
38
36
|
- classpath/postgresql-9.4-1205-jdbc41.jar
|
39
37
|
- lib/embulk/output/redshift.rb
|
40
38
|
- src/main/java/org/embulk/output/RedshiftOutputPlugin.java
|
Binary file
|
Binary file
|