embulk-output-cdata 0.2.0 → 0.3.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: bc2715c7ddddf01a822d1e0ce110e69f34735059
4
- data.tar.gz: 95a3a102de010090e89e9e57298d11c054a631cf
3
+ metadata.gz: 4403bdc2f1e558cd452acc0fef1d9741cd5971f8
4
+ data.tar.gz: e41965e8e79123fc9d09b5bbf44bf856219f56f7
5
5
  SHA512:
6
- metadata.gz: 3ec3982e296815cf2e2e10db304a2ddcbfb7c382592a21b58e21e0499a391096e80e1bb9b6679dcf98a9da1e95f9574a67e5db9adc4bce196522cf30debbb576
7
- data.tar.gz: 9e28687e5e59a607e0499e048acc23707ebfadc23a9e855dee9dbead9c1a79558bb9e25c4c0dd58714a84782be6ac4edc56c7e4bfa362fd8697dd4126bb085e8
6
+ metadata.gz: cfc0e796edb284bb5488c6b80dd560953e7916b2ee3dd5d9ea762b2b8387cbf63d41a79437eca6c9e9df4dd4731d36cd37d6134651d11282f1505feb87ea0332
7
+ data.tar.gz: 61ce986620b87e48670dd34d7d3a8ff30b3fb318f3a9048836bcc57997ed030e3adfd5cec16ee39dab0187b99e3c900cb1f3783964702f96c896d6e6667a7756
data/build.gradle CHANGED
@@ -13,7 +13,7 @@ configurations {
13
13
  provided
14
14
  }
15
15
 
16
- version = "0.2.0"
16
+ version = "0.3.0"
17
17
 
18
18
  sourceCompatibility = 1.8
19
19
  targetCompatibility = 1.8
@@ -19,7 +19,7 @@ public class CDataPageOutputForUpdate implements TransactionalPageOutput {
19
19
  private final Connection conn;
20
20
  private final CDataOutputPlugin.PluginTask task;
21
21
  private PreparedStatement preparedStatement;
22
- private String currentExternalColumnId = "";
22
+ private String currentExternalIdColumn = "";
23
23
 
24
24
  public CDataPageOutputForUpdate(final PageReader reader, Connection conn, CDataOutputPlugin.PluginTask task) {
25
25
  this.pageReader = reader;
@@ -113,7 +113,7 @@ public class CDataPageOutputForUpdate implements TransactionalPageOutput {
113
113
  try {
114
114
  preparedStatementColumnLogger(column);
115
115
  if (Objects.equals(column.getName(), task.getExternalIdColumn())) {
116
- currentExternalColumnId = pageReader.getString(column);
116
+ currentExternalIdColumn = pageReader.getString(column);
117
117
  }
118
118
  preparedStatement.setString(column.getIndex() + 2, pageReader.getString(column));
119
119
  } catch (SQLException e) {
@@ -141,9 +141,14 @@ public class CDataPageOutputForUpdate implements TransactionalPageOutput {
141
141
  }
142
142
  }
143
143
  });
144
- preparedStatement.setString(1, idMap.get(currentExternalColumnId));
145
- preparedStatement.executeUpdate();
146
- logger.info("inserted to Temp#TEMP");
144
+ String id = idMap.get(currentExternalIdColumn);
145
+ if (id != null) {
146
+ preparedStatement.setString(1, idMap.get(currentExternalIdColumn));
147
+ preparedStatement.executeUpdate();
148
+ logger.info("inserted to Temp#TEMP");
149
+ } else {
150
+ logger.info("skipped insert to Temp#TEMP, currentExternalIdColumn: " + currentExternalIdColumn);
151
+ }
147
152
  } catch (SQLException e) {
148
153
  throw new RuntimeException(e);
149
154
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-cdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sampo02
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-18 00:00:00.000000000 Z
11
+ date: 2022-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ files:
49
49
  - LICENSE.txt
50
50
  - README.md
51
51
  - build.gradle
52
- - classpath/embulk-output-cdata-0.2.0.jar
52
+ - classpath/embulk-output-cdata-0.3.0.jar
53
53
  - config/checkstyle/checkstyle.xml
54
54
  - config/checkstyle/default.xml
55
55
  - gradle/wrapper/gradle-wrapper.jar