embulk-output-jdbc 0.7.13 → 0.8.1

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: 411a4c67839886d900bdf7bb5a47216f365103f4
4
- data.tar.gz: 53967bc25669370087fa99085b5975785a093630
3
+ metadata.gz: e5877712dd337106e3928db69f246a063321562d
4
+ data.tar.gz: e6e9a16aa068c522973c6ccf7fa1cc89c0db9ede
5
5
  SHA512:
6
- metadata.gz: 461685691438c570b0ffebd33954cfb24f086b39cac220ecc7483aa0ed678af5f75240019f5f184f0dd5119180c1147e2eba43e3a6e1fcdb39b1331644502093
7
- data.tar.gz: 4ed522ff2ae37f35e95c91122e3a146a24e095f9c74f821ded1ee6110c1affbeafc68cfb79c485c37b6750ba7118d15a2d6f63fd69b68db1b0c302819ba3a893
6
+ metadata.gz: 13b92d80b1891edcb29403b31f018a0b03ca8db6dcd68178bf546210c63dae78e343491badbdb9e1f5ea67df0baad5ef52c9dd64359058d4161478261d041564
7
+ data.tar.gz: 51f4aa60573aaad649cee37f98945c44c394f988db0176d592872a2e006235a9cbae1605239cbc0e2e1f3b1f4bc69a5584483e0b26ccc79136a6f2477cd61087
data/README.md CHANGED
@@ -17,12 +17,12 @@ Generic JDBC output plugin for Embulk loads records to a database using a JDBC d
17
17
  - **password**: database login password (string, optional)
18
18
  - **schema**: destination schema name (string, default: use default schema)
19
19
  - **table**: destination table name (string, required)
20
- - **create_table_constraint** table constraint added to `CREATE TABLE` statement, like `CREATE TABLE <table_name> (<column1> <type1>, <column2> <type2>, ..., <create_table_constraint>) <create_table_option>`.
21
- - **create_table_option** table option added to `CREATE TABLE` statement, like `CREATE TABLE <table_name> (<column1> <type1>, <column2> <type2>, ..., <create_table_constraint>) <create_table_option>`.
20
+ - **create_table_constraint**: table constraint added to `CREATE TABLE` statement, like `CREATE TABLE <table_name> (<column1> <type1>, <column2> <type2>, ..., <create_table_constraint>) <create_table_option>`.
21
+ - **create_table_option**: table option added to `CREATE TABLE` statement, like `CREATE TABLE <table_name> (<column1> <type1>, <column2> <type2>, ..., <create_table_constraint>) <create_table_option>`.
22
22
  - **options**: extra JDBC properties (hash, default: {})
23
- - **retry_limit** max retry count for database operations (integer, default: 12)
24
- - **retry_wait** initial retry wait time in milliseconds (integer, default: 1000 (1 second))
25
- - **max_retry_wait** upper limit of retry wait, which will be doubled at every retry (integer, default: 1800000 (30 minutes))
23
+ - **retry_limit**: max retry count for database operations (integer, default: 12)
24
+ - **retry_wait**: initial retry wait time in milliseconds (integer, default: 1000 (1 second))
25
+ - **max_retry_wait**: upper limit of retry wait, which will be doubled at every retry (integer, default: 1800000 (30 minutes))
26
26
  - **mode**: "insert", "insert_direct", "truncate_insert", or "replace". See below (string, required)
27
27
  - **batch_size**: size of a single batch insert (integer, default: 16777216)
28
28
  - **max_table_name_length**: maximum length of table name in this RDBMS (integer, default: 256)
@@ -77,10 +77,10 @@ public class JdbcOutputPlugin
77
77
  if (t.getUser().isPresent()) {
78
78
  props.setProperty("user", t.getUser().get());
79
79
  }
80
- logger.info("Connecting to {} options {}", t.getUrl(), props);
81
80
  if (t.getPassword().isPresent()) {
82
81
  props.setProperty("password", t.getPassword().get());
83
82
  }
83
+ logConnectionProperties(t.getUrl(), props);
84
84
 
85
85
  return new GenericOutputConnector(t.getUrl(), props, t.getDriverClass(),
86
86
  t.getSchema().orNull());
@@ -3,6 +3,7 @@ package org.embulk.output.jdbc;
3
3
  import java.util.List;
4
4
  import java.util.Map;
5
5
  import java.util.Locale;
6
+ import java.util.Properties;
6
7
  import java.util.Set;
7
8
  import java.util.concurrent.ExecutionException;
8
9
  import java.io.File;
@@ -275,6 +276,19 @@ public abstract class AbstractJdbcOutputPlugin
275
276
  }
276
277
  }
277
278
 
279
+ protected void logConnectionProperties(String url, Properties props)
280
+ {
281
+ Properties maskedProps = new Properties();
282
+ for(String key : props.stringPropertyNames()) {
283
+ if (key.equals("password")) {
284
+ maskedProps.setProperty(key, "***");
285
+ } else {
286
+ maskedProps.setProperty(key, props.getProperty(key));
287
+ }
288
+ }
289
+ logger.info("Connecting to {} options {}", url, maskedProps);
290
+ }
291
+
278
292
  // for subclasses to add @Config
279
293
  protected Class<? extends PluginTask> getTaskClass()
280
294
  {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-jdbc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.13
4
+ version: 0.8.1
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-12-08 00:00:00.000000000 Z
11
+ date: 2018-11-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Inserts or updates records to a table.
14
14
  email:
@@ -19,7 +19,7 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - README.md
21
21
  - build.gradle
22
- - classpath/embulk-output-jdbc-0.7.13.jar
22
+ - classpath/embulk-output-jdbc-0.8.1.jar
23
23
  - lib/embulk/output/jdbc.rb
24
24
  - src/main/java/org/embulk/output/JdbcOutputPlugin.java
25
25
  - src/main/java/org/embulk/output/jdbc/AbstractJdbcOutputPlugin.java