embulk-output-oracle 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +160 -160
- data/build.gradle +6 -6
- data/classpath/embulk-output-jdbc-0.4.2.jar +0 -0
- data/classpath/{embulk-output-oracle-0.4.1.jar → embulk-output-oracle-0.4.2.jar} +0 -0
- data/lib/embulk/output/oracle.rb +3 -3
- data/src/main/cpp/common/dir-path-load.cpp +424 -424
- data/src/main/cpp/common/dir-path-load.h +36 -36
- data/src/main/cpp/common/embulk-output-oracle.cpp +196 -196
- data/src/main/cpp/common/org_embulk_output_oracle_oci_OCI.h +77 -77
- data/src/main/cpp/linux/build.sh +21 -21
- data/src/main/cpp/win/build.bat +31 -31
- data/src/main/cpp/win/dllmain.cpp +25 -25
- data/src/main/cpp/win/embulk-output-oracle.sln +39 -39
- data/src/main/cpp/win/embulk-output-oracle.vcxproj +175 -175
- data/src/main/java/org/embulk/output/OracleOutputPlugin.java +151 -153
- data/src/main/java/org/embulk/output/oracle/DirectBatchInsert.java +290 -290
- data/src/main/java/org/embulk/output/oracle/InsertMethod.java +8 -8
- data/src/main/java/org/embulk/output/oracle/OracleCharset.java +32 -32
- data/src/main/java/org/embulk/output/oracle/OracleOutputConnection.java +179 -165
- data/src/main/java/org/embulk/output/oracle/OracleOutputConnector.java +49 -49
- data/src/main/java/org/embulk/output/oracle/TimestampFormat.java +37 -37
- data/src/main/java/org/embulk/output/oracle/oci/ColumnDefinition.java +26 -26
- data/src/main/java/org/embulk/output/oracle/oci/OCI.java +139 -139
- data/src/main/java/org/embulk/output/oracle/oci/OCIManager.java +64 -64
- data/src/main/java/org/embulk/output/oracle/oci/OCIWrapper.java +96 -96
- data/src/main/java/org/embulk/output/oracle/oci/RowBuffer.java +105 -105
- data/src/main/java/org/embulk/output/oracle/oci/TableDefinition.java +24 -24
- data/src/test/cpp/common/embulk-output-oracle-test.cpp +69 -69
- data/src/test/cpp/linux/build.sh +19 -19
- data/src/test/cpp/win/build.bat +28 -28
- data/src/test/cpp/win/embulk-output-oracle-test.vcxproj +154 -154
- data/src/test/java/org/embulk/input/filesplit/LocalFileSplitInputPlugin.java +185 -187
- data/src/test/java/org/embulk/input/filesplit/PartialFile.java +49 -49
- data/src/test/java/org/embulk/input/filesplit/PartialFileInputStream.java +154 -154
- data/src/test/java/org/embulk/output/oracle/OracleOutputPluginTest.java +50 -25
- data/src/test/java/org/embulk/output/oracle/OracleOutputPluginTestImpl.java +548 -540
- data/src/test/java/org/embulk/output/oracle/TimestampFormatTest.java +57 -57
- data/src/test/java/org/embulk/output/tester/EmbulkPluginTester.java +79 -0
- data/src/test/resources/data/test1/test1.csv +3 -3
- data/src/test/resources/dummy.txt +1 -0
- data/src/test/resources/yml/test-insert-direct-direct-method.yml +26 -26
- data/src/test/resources/yml/test-insert-direct-empty.yml +25 -25
- data/src/test/resources/yml/test-insert-direct-oci-method-split.yml +28 -28
- data/src/test/resources/yml/test-insert-direct-oci-method.yml +28 -28
- data/src/test/resources/yml/test-insert-direct.yml +25 -25
- data/src/test/resources/yml/test-insert-empty.yml +27 -27
- data/src/test/resources/yml/test-insert.yml +25 -27
- data/src/test/resources/yml/test-replace-empty.yml +31 -31
- data/src/test/resources/yml/test-replace-long-name-multibyte.yml +31 -31
- data/src/test/resources/yml/test-replace-long-name.yml +31 -31
- data/src/test/resources/yml/test-replace.yml +31 -31
- data/src/test/resources/yml/test-string-timestamp.yml +28 -28
- data/src/test/resources/yml/test-url.yml +24 -24
- metadata +6 -8
- data/classpath/embulk-output-jdbc-0.4.1.jar +0 -0
- data/lib/embulk/linux_x64/libembulk-output-oracle.so +0 -0
- data/src/test/java/org/embulk/output/oracle/ChildFirstClassLoader.java +0 -42
- data/src/test/java/org/embulk/output/oracle/EmbulkPluginTester.java +0 -124
- data/src/test/java/org/embulk/output/oracle/EmptyConfigSource.java +0 -105
@@ -1,57 +1,57 @@
|
|
1
|
-
package org.embulk.output.oracle;
|
2
|
-
|
3
|
-
import java.sql.Timestamp;
|
4
|
-
import java.text.ParseException;
|
5
|
-
import java.text.SimpleDateFormat;
|
6
|
-
import java.util.Date;
|
7
|
-
|
8
|
-
import org.junit.Test;
|
9
|
-
import static org.junit.Assert.assertEquals;
|
10
|
-
|
11
|
-
public class TimestampFormatTest {
|
12
|
-
|
13
|
-
@Test
|
14
|
-
public void test() throws ParseException
|
15
|
-
{
|
16
|
-
Date date = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").parse("2015/03/04 17:08:09");
|
17
|
-
Timestamp t = new Timestamp(date.getTime());
|
18
|
-
|
19
|
-
{
|
20
|
-
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 9);
|
21
|
-
assertEquals("2015-03-04 17:08:09.000000000", format.format(t));
|
22
|
-
}
|
23
|
-
{
|
24
|
-
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 0);
|
25
|
-
assertEquals("2015-03-04 17:08:09", format.format(t));
|
26
|
-
}
|
27
|
-
{
|
28
|
-
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 1);
|
29
|
-
assertEquals("2015-03-04 17:08:09.0", format.format(t));
|
30
|
-
}
|
31
|
-
|
32
|
-
t.setNanos(1234567);
|
33
|
-
{
|
34
|
-
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 9);
|
35
|
-
assertEquals("2015-03-04 17:08:09.001234567", format.format(t));
|
36
|
-
}
|
37
|
-
{
|
38
|
-
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 2);
|
39
|
-
assertEquals("2015-03-04 17:08:09.00", format.format(t));
|
40
|
-
}
|
41
|
-
{
|
42
|
-
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 3);
|
43
|
-
assertEquals("2015-03-04 17:08:09.001", format.format(t));
|
44
|
-
}
|
45
|
-
|
46
|
-
t.setNanos(123456789);
|
47
|
-
{
|
48
|
-
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 9);
|
49
|
-
assertEquals("2015-03-04 17:08:09.123456789", format.format(t));
|
50
|
-
}
|
51
|
-
{
|
52
|
-
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 1);
|
53
|
-
assertEquals("2015-03-04 17:08:09.1", format.format(t));
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
|
-
}
|
1
|
+
package org.embulk.output.oracle;
|
2
|
+
|
3
|
+
import java.sql.Timestamp;
|
4
|
+
import java.text.ParseException;
|
5
|
+
import java.text.SimpleDateFormat;
|
6
|
+
import java.util.Date;
|
7
|
+
|
8
|
+
import org.junit.Test;
|
9
|
+
import static org.junit.Assert.assertEquals;
|
10
|
+
|
11
|
+
public class TimestampFormatTest {
|
12
|
+
|
13
|
+
@Test
|
14
|
+
public void test() throws ParseException
|
15
|
+
{
|
16
|
+
Date date = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").parse("2015/03/04 17:08:09");
|
17
|
+
Timestamp t = new Timestamp(date.getTime());
|
18
|
+
|
19
|
+
{
|
20
|
+
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 9);
|
21
|
+
assertEquals("2015-03-04 17:08:09.000000000", format.format(t));
|
22
|
+
}
|
23
|
+
{
|
24
|
+
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 0);
|
25
|
+
assertEquals("2015-03-04 17:08:09", format.format(t));
|
26
|
+
}
|
27
|
+
{
|
28
|
+
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 1);
|
29
|
+
assertEquals("2015-03-04 17:08:09.0", format.format(t));
|
30
|
+
}
|
31
|
+
|
32
|
+
t.setNanos(1234567);
|
33
|
+
{
|
34
|
+
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 9);
|
35
|
+
assertEquals("2015-03-04 17:08:09.001234567", format.format(t));
|
36
|
+
}
|
37
|
+
{
|
38
|
+
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 2);
|
39
|
+
assertEquals("2015-03-04 17:08:09.00", format.format(t));
|
40
|
+
}
|
41
|
+
{
|
42
|
+
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 3);
|
43
|
+
assertEquals("2015-03-04 17:08:09.001", format.format(t));
|
44
|
+
}
|
45
|
+
|
46
|
+
t.setNanos(123456789);
|
47
|
+
{
|
48
|
+
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 9);
|
49
|
+
assertEquals("2015-03-04 17:08:09.123456789", format.format(t));
|
50
|
+
}
|
51
|
+
{
|
52
|
+
TimestampFormat format = new TimestampFormat("yyyy-MM-dd HH:mm:ss", 1);
|
53
|
+
assertEquals("2015-03-04 17:08:09.1", format.format(t));
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
package org.embulk.output.tester;
|
2
|
+
|
3
|
+
import java.io.File;
|
4
|
+
import java.util.ArrayList;
|
5
|
+
import java.util.List;
|
6
|
+
|
7
|
+
import org.embulk.EmbulkEmbed;
|
8
|
+
import org.embulk.EmbulkEmbed.Bootstrap;
|
9
|
+
import org.embulk.config.ConfigSource;
|
10
|
+
import org.embulk.plugin.InjectedPluginSource;
|
11
|
+
|
12
|
+
import com.google.inject.Binder;
|
13
|
+
import com.google.inject.Module;
|
14
|
+
|
15
|
+
public class EmbulkPluginTester
|
16
|
+
{
|
17
|
+
private static class PluginDefinition
|
18
|
+
{
|
19
|
+
public final Class<?> iface;
|
20
|
+
public final String name;
|
21
|
+
public final Class<?> impl;
|
22
|
+
|
23
|
+
|
24
|
+
public PluginDefinition(Class<?> iface, String name, Class<?> impl)
|
25
|
+
{
|
26
|
+
this.iface = iface;
|
27
|
+
this.name = name;
|
28
|
+
this.impl = impl;
|
29
|
+
}
|
30
|
+
|
31
|
+
}
|
32
|
+
|
33
|
+
private final List<PluginDefinition> plugins = new ArrayList<PluginDefinition>();
|
34
|
+
|
35
|
+
private EmbulkEmbed embulk;
|
36
|
+
|
37
|
+
public EmbulkPluginTester()
|
38
|
+
{
|
39
|
+
}
|
40
|
+
|
41
|
+
public EmbulkPluginTester(Class<?> iface, String name, Class<?> impl)
|
42
|
+
{
|
43
|
+
addPlugin(iface, name, impl);
|
44
|
+
}
|
45
|
+
|
46
|
+
public void addPlugin(Class<?> iface, String name, Class<?> impl)
|
47
|
+
{
|
48
|
+
plugins.add(new PluginDefinition(iface, name, impl));
|
49
|
+
}
|
50
|
+
|
51
|
+
public void run(String ymlPath) throws Exception
|
52
|
+
{
|
53
|
+
if (embulk == null) {
|
54
|
+
Bootstrap bootstrap = new EmbulkEmbed.Bootstrap();
|
55
|
+
bootstrap.addModules(new Module()
|
56
|
+
{
|
57
|
+
@Override
|
58
|
+
public void configure(Binder binder)
|
59
|
+
{
|
60
|
+
for (PluginDefinition plugin : plugins) {
|
61
|
+
InjectedPluginSource.registerPluginTo(binder, plugin.iface, plugin.name, plugin.impl);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
});
|
65
|
+
embulk = bootstrap.initializeCloseable();
|
66
|
+
}
|
67
|
+
|
68
|
+
ConfigSource config = embulk.newConfigLoader().fromYamlFile(new File(ymlPath));
|
69
|
+
embulk.run(config);
|
70
|
+
}
|
71
|
+
|
72
|
+
public void destroy() {
|
73
|
+
if (embulk != null) {
|
74
|
+
embulk.destroy();
|
75
|
+
embulk = null;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
A001,ABCDE,0,123.45,2015/03/05,2015/03/05 12:34:56
|
2
|
-
A002,あいうえお,-9999,-99999999.99,2015/03/06,2015/03/06 23:59:59
|
3
|
-
A003,,,,,
|
1
|
+
A001,ABCDE,0,123.45,2015/03/05,2015/03/05 12:34:56
|
2
|
+
A002,あいうえお,-9999,-99999999.99,2015/03/06,2015/03/06 23:59:59
|
3
|
+
A003,,,,,
|
@@ -0,0 +1 @@
|
|
1
|
+
dummy
|
@@ -1,26 +1,26 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/data/test1/test1.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ID, type: string}
|
12
|
-
- {name: VARCHAR2_ITEM, type: string}
|
13
|
-
- {name: INTEGER_ITEM, type: long}
|
14
|
-
- {name: NUMBER_ITEM, type: string}
|
15
|
-
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
16
|
-
- {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
17
|
-
out:
|
18
|
-
type: oracle
|
19
|
-
host: localhost
|
20
|
-
database: TESTDB
|
21
|
-
user: TEST_USER
|
22
|
-
password: test_pw
|
23
|
-
table: TEST1
|
24
|
-
mode: insert_direct
|
25
|
-
insert_method: direct
|
26
|
-
#driver_path: driver/ojdbc7.jar
|
1
|
+
in:
|
2
|
+
type: file
|
3
|
+
path_prefix: '/data/test1/test1.csv'
|
4
|
+
parser:
|
5
|
+
charset: UTF-8
|
6
|
+
newline: CRLF
|
7
|
+
type: csv
|
8
|
+
delimiter: ','
|
9
|
+
quote: ''
|
10
|
+
columns:
|
11
|
+
- {name: ID, type: string}
|
12
|
+
- {name: VARCHAR2_ITEM, type: string}
|
13
|
+
- {name: INTEGER_ITEM, type: long}
|
14
|
+
- {name: NUMBER_ITEM, type: string}
|
15
|
+
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
16
|
+
- {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
17
|
+
out:
|
18
|
+
type: oracle
|
19
|
+
host: localhost
|
20
|
+
database: TESTDB
|
21
|
+
user: TEST_USER
|
22
|
+
password: test_pw
|
23
|
+
table: TEST1
|
24
|
+
mode: insert_direct
|
25
|
+
insert_method: direct
|
26
|
+
#driver_path: driver/ojdbc7.jar
|
@@ -1,25 +1,25 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/data/test2/'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ID, type: string}
|
12
|
-
- {name: VARCHAR2_ITEM, type: string}
|
13
|
-
- {name: INTEGER_ITEM, type: long}
|
14
|
-
- {name: NUMBER_ITEM, type: string}
|
15
|
-
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
16
|
-
- {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
17
|
-
out:
|
18
|
-
type: oracle
|
19
|
-
host: localhost
|
20
|
-
database: TESTDB
|
21
|
-
user: TEST_USER
|
22
|
-
password: test_pw
|
23
|
-
table: TEST1
|
24
|
-
mode: insert_direct
|
25
|
-
#driver_path: driver/ojdbc7.jar
|
1
|
+
in:
|
2
|
+
type: file
|
3
|
+
path_prefix: '/data/test2/'
|
4
|
+
parser:
|
5
|
+
charset: UTF-8
|
6
|
+
newline: CRLF
|
7
|
+
type: csv
|
8
|
+
delimiter: ','
|
9
|
+
quote: ''
|
10
|
+
columns:
|
11
|
+
- {name: ID, type: string}
|
12
|
+
- {name: VARCHAR2_ITEM, type: string}
|
13
|
+
- {name: INTEGER_ITEM, type: long}
|
14
|
+
- {name: NUMBER_ITEM, type: string}
|
15
|
+
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
16
|
+
- {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
17
|
+
out:
|
18
|
+
type: oracle
|
19
|
+
host: localhost
|
20
|
+
database: TESTDB
|
21
|
+
user: TEST_USER
|
22
|
+
password: test_pw
|
23
|
+
table: TEST1
|
24
|
+
mode: insert_direct
|
25
|
+
#driver_path: driver/ojdbc7.jar
|
@@ -1,28 +1,28 @@
|
|
1
|
-
in:
|
2
|
-
type: filesplit
|
3
|
-
path: '/data/test1/test1.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ID, type: string}
|
12
|
-
- {name: VARCHAR2_ITEM, type: string}
|
13
|
-
- {name: INTEGER_ITEM, type: long}
|
14
|
-
- {name: NUMBER_ITEM, type: string}
|
15
|
-
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
16
|
-
- {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
17
|
-
out:
|
18
|
-
type: oracle
|
19
|
-
host: localhost
|
20
|
-
database: TESTDB
|
21
|
-
user: TEST_USER
|
22
|
-
password: test_pw
|
23
|
-
table: TEST1
|
24
|
-
mode: insert_direct
|
25
|
-
insert_method: oci
|
26
|
-
column_options:
|
27
|
-
INTEGER_ITEM: {value_type: pass}
|
28
|
-
#driver_path: driver/ojdbc7.jar
|
1
|
+
in:
|
2
|
+
type: filesplit
|
3
|
+
path: '/data/test1/test1.csv'
|
4
|
+
parser:
|
5
|
+
charset: UTF-8
|
6
|
+
newline: CRLF
|
7
|
+
type: csv
|
8
|
+
delimiter: ','
|
9
|
+
quote: ''
|
10
|
+
columns:
|
11
|
+
- {name: ID, type: string}
|
12
|
+
- {name: VARCHAR2_ITEM, type: string}
|
13
|
+
- {name: INTEGER_ITEM, type: long}
|
14
|
+
- {name: NUMBER_ITEM, type: string}
|
15
|
+
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
16
|
+
- {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
17
|
+
out:
|
18
|
+
type: oracle
|
19
|
+
host: localhost
|
20
|
+
database: TESTDB
|
21
|
+
user: TEST_USER
|
22
|
+
password: test_pw
|
23
|
+
table: TEST1
|
24
|
+
mode: insert_direct
|
25
|
+
insert_method: oci
|
26
|
+
column_options:
|
27
|
+
INTEGER_ITEM: {value_type: pass}
|
28
|
+
#driver_path: driver/ojdbc7.jar
|
@@ -1,28 +1,28 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/data/test1/test1.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ID, type: string}
|
12
|
-
- {name: VARCHAR2_ITEM, type: string}
|
13
|
-
- {name: INTEGER_ITEM, type: long}
|
14
|
-
- {name: NUMBER_ITEM, type: string}
|
15
|
-
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
16
|
-
- {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
17
|
-
out:
|
18
|
-
type: oracle
|
19
|
-
host: localhost
|
20
|
-
database: TESTDB
|
21
|
-
user: TEST_USER
|
22
|
-
password: test_pw
|
23
|
-
table: TEST1
|
24
|
-
mode: insert_direct
|
25
|
-
insert_method: oci
|
26
|
-
column_options:
|
27
|
-
INTEGER_ITEM: {value_type: pass}
|
28
|
-
#driver_path: driver/ojdbc7.jar
|
1
|
+
in:
|
2
|
+
type: file
|
3
|
+
path_prefix: '/data/test1/test1.csv'
|
4
|
+
parser:
|
5
|
+
charset: UTF-8
|
6
|
+
newline: CRLF
|
7
|
+
type: csv
|
8
|
+
delimiter: ','
|
9
|
+
quote: ''
|
10
|
+
columns:
|
11
|
+
- {name: ID, type: string}
|
12
|
+
- {name: VARCHAR2_ITEM, type: string}
|
13
|
+
- {name: INTEGER_ITEM, type: long}
|
14
|
+
- {name: NUMBER_ITEM, type: string}
|
15
|
+
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
16
|
+
- {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
17
|
+
out:
|
18
|
+
type: oracle
|
19
|
+
host: localhost
|
20
|
+
database: TESTDB
|
21
|
+
user: TEST_USER
|
22
|
+
password: test_pw
|
23
|
+
table: TEST1
|
24
|
+
mode: insert_direct
|
25
|
+
insert_method: oci
|
26
|
+
column_options:
|
27
|
+
INTEGER_ITEM: {value_type: pass}
|
28
|
+
#driver_path: driver/ojdbc7.jar
|
@@ -1,25 +1,25 @@
|
|
1
|
-
in:
|
2
|
-
type: file
|
3
|
-
path_prefix: '/data/test1/test1.csv'
|
4
|
-
parser:
|
5
|
-
charset: UTF-8
|
6
|
-
newline: CRLF
|
7
|
-
type: csv
|
8
|
-
delimiter: ','
|
9
|
-
quote: ''
|
10
|
-
columns:
|
11
|
-
- {name: ID, type: string}
|
12
|
-
- {name: VARCHAR2_ITEM, type: string}
|
13
|
-
- {name: INTEGER_ITEM, type: long}
|
14
|
-
- {name: NUMBER_ITEM, type: string}
|
15
|
-
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
16
|
-
- {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
17
|
-
out:
|
18
|
-
type: oracle
|
19
|
-
host: localhost
|
20
|
-
database: TESTDB
|
21
|
-
user: TEST_USER
|
22
|
-
password: test_pw
|
23
|
-
table: TEST1
|
24
|
-
mode: insert_direct
|
25
|
-
#driver_path: driver/ojdbc7.jar
|
1
|
+
in:
|
2
|
+
type: file
|
3
|
+
path_prefix: '/data/test1/test1.csv'
|
4
|
+
parser:
|
5
|
+
charset: UTF-8
|
6
|
+
newline: CRLF
|
7
|
+
type: csv
|
8
|
+
delimiter: ','
|
9
|
+
quote: ''
|
10
|
+
columns:
|
11
|
+
- {name: ID, type: string}
|
12
|
+
- {name: VARCHAR2_ITEM, type: string}
|
13
|
+
- {name: INTEGER_ITEM, type: long}
|
14
|
+
- {name: NUMBER_ITEM, type: string}
|
15
|
+
- {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
|
16
|
+
- {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
|
17
|
+
out:
|
18
|
+
type: oracle
|
19
|
+
host: localhost
|
20
|
+
database: TESTDB
|
21
|
+
user: TEST_USER
|
22
|
+
password: test_pw
|
23
|
+
table: TEST1
|
24
|
+
mode: insert_direct
|
25
|
+
#driver_path: driver/ojdbc7.jar
|