embulk-output-oracle 0.7.0 → 0.7.1
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 -0
- data/classpath/{embulk-output-jdbc-0.7.0.jar → embulk-output-jdbc-0.7.1.jar} +0 -0
- data/classpath/{embulk-output-oracle-0.7.0.jar → embulk-output-oracle-0.7.1.jar} +0 -0
- data/src/main/java/org/embulk/output/oracle/oci/OCI.java +1 -0
- data/src/main/java/org/embulk/output/oracle/oci/OCIWrapper.java +20 -8
- data/src/test/java/org/embulk/output/oracle/OracleOutputPluginTest.java +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 358c95dcbfbd104bb1ce987ed429b676bf6fd651
|
4
|
+
data.tar.gz: f6d381125a22e04c7843cc0579bceb8b5845ba93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecbcc19a7e2efc3246d1885995741a2421ce2e87b8684fe7179632cfa69611656b4c79acb351b63a9ef136b2894fe83249c1401ab6f1e6128b1a6f9a485e567b
|
7
|
+
data.tar.gz: 49130a08d740618752d5979a813b1d06c1b86bd680d00d36ac315c8cb44a55ac378225a0cd58b0393e71979f810184a7e34bc511d97e7d7114eccbe73d322eaa
|
data/README.md
CHANGED
@@ -31,6 +31,7 @@ Oracle output plugin for Embulk loads records to Oracle.
|
|
31
31
|
- **value_type**: This plugin converts input column type (embulk type) into a database type to build a INSERT statement. This value_type option controls the type of the value in a INSERT statement. (string, default: depends on the sql type of the column. Available values options are: `byte`, `short`, `int`, `long`, `double`, `float`, `boolean`, `string`, `nstring`, `date`, `time`, `timestamp`, `decimal`, `json`, `null`, `pass`)
|
32
32
|
- **timestamp_format**: If input column type (embulk type) is timestamp and value_type is `string` or `nstring`, this plugin needs to format the timestamp value into a string. This timestamp_format option is used to control the format of the timestamp. (string, default: `%Y-%m-%d %H:%M:%S.%6N`)
|
33
33
|
- **timezone**: If input column type (embulk type) is timestamp, this plugin needs to format the timestamp value into a SQL string. In this cases, this timezone option is used to control the timezone. (string, value of default_timezone option is used by default)
|
34
|
+
- **after_load**: if set, this SQL will be executed after loading all records.
|
34
35
|
|
35
36
|
### Modes
|
36
37
|
|
Binary file
|
Binary file
|
@@ -529,18 +529,30 @@ public class OCIWrapper
|
|
529
529
|
case OCI.OCI_SUCCESS:
|
530
530
|
break;
|
531
531
|
|
532
|
+
case OCI.OCI_SUCCESS_WITH_INFO:
|
533
|
+
if (errHandle != null) {
|
534
|
+
ArrayMemoryIO errrCode = new ArrayMemoryIO(Runtime.getSystemRuntime(), 4);
|
535
|
+
ArrayMemoryIO buffer = new ArrayMemoryIO(Runtime.getSystemRuntime(), 512);
|
536
|
+
if (oci.OCIErrorGet(errHandle, 1, null, errrCode, buffer, (int)buffer.size(), OCI.OCI_HTYPE_ERROR) == OCI.OCI_SUCCESS) {
|
537
|
+
String message = new String(buffer.array(), systemCharset);
|
538
|
+
logger.warn(message);
|
539
|
+
}
|
540
|
+
}
|
541
|
+
break;
|
542
|
+
|
532
543
|
case OCI.OCI_ERROR:
|
533
544
|
if (errHandle == null) {
|
534
545
|
throwException("OCI : %s failed : %d.", operation, result);
|
535
|
-
}
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
546
|
+
} else {
|
547
|
+
ArrayMemoryIO errrCode = new ArrayMemoryIO(Runtime.getSystemRuntime(), 4);
|
548
|
+
ArrayMemoryIO buffer = new ArrayMemoryIO(Runtime.getSystemRuntime(), 512);
|
549
|
+
if (oci.OCIErrorGet(errHandle, 1, null, errrCode, buffer, (int)buffer.size(), OCI.OCI_HTYPE_ERROR) != OCI.OCI_SUCCESS) {
|
550
|
+
throwException("OCI : %s failed : %d. OCIErrorGet failed.", operation, result);
|
551
|
+
}
|
541
552
|
|
542
|
-
|
543
|
-
|
553
|
+
String message = new String(buffer.array(), systemCharset);
|
554
|
+
throwException("OCI : %s failed : %d. %s", operation, result, message);
|
555
|
+
}
|
544
556
|
|
545
557
|
case OCI.OCI_INVALID_HANDLE:
|
546
558
|
throwException("OCI : %s failed : invalid handle.", operation);
|
@@ -45,7 +45,7 @@ public class OracleOutputPluginTest extends AbstractJdbcOutputPluginTest
|
|
45
45
|
try {
|
46
46
|
Class.forName("oracle.jdbc.OracleDriver");
|
47
47
|
} catch (ClassNotFoundException | NoClassDefFoundError e) {
|
48
|
-
System.err.println("Warning: you should put 'ojdbc7.jar' in 'embulk-
|
48
|
+
System.err.println("Warning: you should put 'ojdbc7.jar' in 'embulk-output-oracle/driver' directory in order to test.");
|
49
49
|
return;
|
50
50
|
}
|
51
51
|
|
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.7.
|
4
|
+
version: 0.7.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: 2016-
|
11
|
+
date: 2016-11-25 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.7.
|
23
|
-
- classpath/embulk-output-oracle-0.7.
|
22
|
+
- classpath/embulk-output-jdbc-0.7.1.jar
|
23
|
+
- classpath/embulk-output-oracle-0.7.1.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
|