embulk-output-oracle 0.6.5 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/build.gradle +1 -1
  4. data/classpath/{embulk-output-jdbc-0.6.5.jar → embulk-output-jdbc-0.7.0.jar} +0 -0
  5. data/classpath/{embulk-output-oracle-0.6.5.jar → embulk-output-oracle-0.7.0.jar} +0 -0
  6. data/src/test/java/org/embulk/output/oracle/OracleOutputPluginTest.java +9 -9
  7. data/src/test/resources/oracle/yml/test-insert-direct-direct-method.yml +4 -4
  8. data/src/test/resources/oracle/yml/test-insert-direct-empty.yml +4 -4
  9. data/src/test/resources/oracle/yml/test-insert-direct-oci-method-large.yml +4 -4
  10. data/src/test/resources/oracle/yml/test-insert-direct-oci-method-multibyte.yml +4 -4
  11. data/src/test/resources/oracle/yml/test-insert-direct-oci-method-split.yml +4 -4
  12. data/src/test/resources/oracle/yml/test-insert-direct-oci-method.yml +4 -4
  13. data/src/test/resources/oracle/yml/test-insert-direct.yml +4 -4
  14. data/src/test/resources/oracle/yml/test-insert-empty.yml +4 -4
  15. data/src/test/resources/oracle/yml/test-insert.yml +4 -4
  16. data/src/test/resources/oracle/yml/test-lower-column-options.yml +4 -4
  17. data/src/test/resources/oracle/yml/test-lower-column.yml +4 -4
  18. data/src/test/resources/oracle/yml/test-lower-table.yml +4 -4
  19. data/src/test/resources/oracle/yml/test-replace-empty.yml +4 -4
  20. data/src/test/resources/oracle/yml/test-replace-long-name-multibyte.yml +4 -4
  21. data/src/test/resources/oracle/yml/test-replace-long-name.yml +4 -4
  22. data/src/test/resources/oracle/yml/test-replace-oci-method.yml +4 -4
  23. data/src/test/resources/oracle/yml/test-replace.yml +4 -4
  24. data/src/test/resources/oracle/yml/test-string-timestamp.yml +4 -4
  25. data/src/test/resources/oracle/yml/test-truncate-insert-oci-method.yml +4 -4
  26. data/src/test/resources/oracle/yml/test-truncate-insert.yml +4 -4
  27. data/src/test/resources/oracle/yml/test-url.yml +3 -3
  28. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba951a3e467154c25d59dd8e37d0ea7ed345b2c1
4
- data.tar.gz: 2460425a8bac3b445d80f9644680a21b84c5e972
3
+ metadata.gz: 807550e963921329a90f3e59f3795d457fbca74d
4
+ data.tar.gz: 196ee9e52839d9bcaa77e6d6e8a04f7df4e3211e
5
5
  SHA512:
6
- metadata.gz: edd79e76f7fa2631f556f6de2d838b2a205431eb89c262076b10c0bd48d808ee760b38f6550041829546e285fbc3dea6e59a6d59537755ec3416a639fea1fe95
7
- data.tar.gz: a05efdd0d48d60f098affb33ceb8639f8246c780f405f1c513b126f10afd4fa274921ae294fed5e5de5980d42e3de485e82b4aecd62c7cd85a652555a8d17b44
6
+ metadata.gz: 75e419a9fa39ef065064e3374e883059afc55a26dc607718d6eb1c26a9152e3b69734b818897f118a291f70990751d0f76260ac3465b92a39a7e1c9d2fb4c972
7
+ data.tar.gz: 173329f757b809d65deb30e5111daed0f12ad90aba6a4737ff9c3e7abed2526d7d0589a665ff836fea1b53a75ec3cdafd6a04e4d9b953e59b6684ba2ba9bfb9f
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Oracle output plugins for Embulk
1
+ # Oracle output plugin for Embulk
2
2
 
3
- Oracle output plugins for Embulk loads records to Oracle.
3
+ Oracle output plugin for Embulk loads records to Oracle.
4
4
 
5
5
  ## Overview
6
6
 
@@ -2,6 +2,6 @@ dependencies {
2
2
  compile project(':embulk-output-jdbc')
3
3
 
4
4
  testCompile 'org.embulk:embulk-standards:0.8.8'
5
- testCompile files('../embulk-output-jdbc/build/classes/test/')
5
+ testCompile project(':embulk-output-jdbc').sourceSets.test.output
6
6
  testCompile files('driver/ojdbc7.jar')
7
7
  }
@@ -1,5 +1,6 @@
1
1
  package org.embulk.output.oracle;
2
2
 
3
+ import static java.util.Locale.ENGLISH;
3
4
  import static org.junit.Assert.assertEquals;
4
5
  import static org.junit.Assert.fail;
5
6
 
@@ -25,20 +26,17 @@ import org.embulk.output.AbstractJdbcOutputPluginTest;
25
26
  import org.embulk.output.OracleOutputPlugin;
26
27
  import org.embulk.spi.InputPlugin;
27
28
  import org.embulk.spi.OutputPlugin;
28
- import org.junit.BeforeClass;
29
29
  import org.junit.Test;
30
30
 
31
31
 
32
32
  public class OracleOutputPluginTest extends AbstractJdbcOutputPluginTest
33
33
  {
34
- static {
34
+ @Override
35
+ protected void prepare() throws SQLException
36
+ {
35
37
  tester.addPlugin(OutputPlugin.class, "oracle", OracleOutputPlugin.class);
36
38
  tester.addPlugin(InputPlugin.class, "filesplit", LocalFileSplitInputPlugin.class);
37
- }
38
39
 
39
- @BeforeClass
40
- public static void beforeClass() throws Exception
41
- {
42
40
  if (System.getProperty("path.separator").equals(";")) {
43
41
  // for Windows
44
42
  System.setProperty("file.encoding", "MS932");
@@ -51,14 +49,15 @@ public class OracleOutputPluginTest extends AbstractJdbcOutputPluginTest
51
49
  return;
52
50
  }
53
51
 
54
- try (Connection connection = new OracleOutputPluginTest().connect()) {
52
+ try (Connection connection = connect()) {
55
53
  String version = connection.getMetaData().getDriverVersion();
56
54
  System.out.println("Driver version = " + version);
57
55
  enabled = true;
58
56
 
59
57
  } catch (SQLException e) {
60
58
  System.err.println(e);
61
- System.err.println("Warning: prepare a schema on Oracle 12c (database = 'TESTDB', user = 'TEST_USER', password = 'test_pw', charset = UTF-8).");
59
+ System.err.println(String.format(ENGLISH, "Warning: prepare a schema on Oracle 12c (server = %s, port = %d, database = %s, user = %s, password = %s, charset = UTF-8).",
60
+ getHost(), getPort(), getDatabase(), getUser(), getPassword()));
62
61
  // for example
63
62
  // CREATE USER EMBULK_USER IDENTIFIED BY "embulk_pw";
64
63
  // GRANT DBA TO EMBULK_USER;
@@ -692,7 +691,8 @@ public class OracleOutputPluginTest extends AbstractJdbcOutputPluginTest
692
691
  @Override
693
692
  protected Connection connect() throws SQLException
694
693
  {
695
- return DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:TESTDB", "TEST_USER", "test_pw");
694
+ return DriverManager.getConnection(String.format(ENGLISH, "jdbc:oracle:thin:@%s:%d:%s", getHost(), getPort(), getDatabase()),
695
+ getUser(), getPassword());
696
696
  }
697
697
 
698
698
  }
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert_direct
26
26
  insert_method: direct
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert_direct
26
26
  #driver_path: driver/ojdbc7.jar
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert_direct
26
26
  insert_method: oci
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert_direct
26
26
  insert_method: oci
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert_direct
26
26
  insert_method: oci
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert_direct
26
26
  insert_method: oci
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert_direct
26
26
  #driver_path: driver/ojdbc7.jar
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert
26
26
  #driver_path: driver/ojdbc7.jar
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert
26
26
  #driver_path: driver/ojdbc7.jar
@@ -17,10 +17,10 @@ in:
17
17
  - {name: timestamp_item, type: string}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert_direct
26
26
  column_options:
@@ -17,10 +17,10 @@ in:
17
17
  - {name: timestamp_item, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert_direct
26
26
  #driver_path: driver/ojdbc7.jar
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: test1
25
25
  mode: insert_direct
26
26
  #driver_path: driver/ojdbc7.jar
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: replace
26
26
  column_options:
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST123456789012345678
25
25
  mode: replace
26
26
  column_options:
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST12345678901234567890123456
25
25
  mode: replace
26
26
  column_options:
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: replace
26
26
  insert_method: oci
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: replace
26
26
  column_options:
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: string}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: insert_direct
26
26
  column_options:
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: truncate_insert
26
26
  insert_method: oci
@@ -17,10 +17,10 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- host: localhost
21
- database: TESTDB
22
- user: TEST_USER
23
- password: test_pw
20
+ host: #host#
21
+ database: #database#
22
+ user: #user#
23
+ password: #password#
24
24
  table: TEST1
25
25
  mode: truncate_insert
26
26
  #driver_path: driver/ojdbc7.jar
@@ -17,9 +17,9 @@ in:
17
17
  - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
18
18
  out:
19
19
  type: oracle
20
- user: TEST_USER
21
- password: test_pw
20
+ user: #user#
21
+ password: #password#
22
22
  table: TEST1
23
23
  mode: insert_direct
24
24
  #driver_path: driver/ojdbc7.jar
25
- url: jdbc:oracle:thin:@localhost:1521:TESTDB
25
+ url: jdbc:oracle:thin:@#host#:#port#:#database#
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-oracle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.7.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: 2016-10-11 00:00:00.000000000 Z
11
+ date: 2016-10-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Inserts or updates records to a table.
14
14
  email:
@@ -19,8 +19,8 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - README.md
21
21
  - build.gradle
22
- - classpath/embulk-output-jdbc-0.6.5.jar
23
- - classpath/embulk-output-oracle-0.6.5.jar
22
+ - classpath/embulk-output-jdbc-0.7.0.jar
23
+ - classpath/embulk-output-oracle-0.7.0.jar
24
24
  - lib/embulk/native/x86_64-linux/libembulk-output-oracle-oci.so
25
25
  - lib/embulk/native/x86_64-windows/embulk-output-oracle-oci.dll
26
26
  - lib/embulk/output/oracle.rb