embulk-input-oracle 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -0
- data/classpath/{embulk-input-jdbc-0.8.2.jar → embulk-input-jdbc-0.8.3.jar} +0 -0
- data/classpath/embulk-input-oracle-0.8.3.jar +0 -0
- data/src/main/java/org/embulk/input/OracleInputPlugin.java +14 -6
- data/src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java +36 -0
- data/src/test/java/org/embulk/input/oracle/BasicTest.java +7 -7
- data/src/test/java/org/embulk/input/oracle/IncrementalTest.java +144 -0
- data/src/test/java/org/embulk/input/oracle/OracleTests.java +10 -10
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/config_1.yml +4 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/config_2.yml +4 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/expected_1.csv +4 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/expected_1.diff +3 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/expected_2.csv +2 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/expected_2.diff +3 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/insert_more.sql +5 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/setup.sql +13 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/config_1.yml +5 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/config_2.yml +6 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/expected_1.csv +4 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/expected_1.diff +3 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/expected_2.csv +2 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/expected_2.diff +3 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/insert_more.sql +6 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/setup.sql +13 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/config_1.yml +4 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/config_2.yml +4 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/expected_1.csv +7 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/expected_1.diff +3 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/expected_2.csv +3 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/expected_2.diff +3 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/insert_more.sql +8 -0
- data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/setup.sql +16 -0
- metadata +30 -4
- data/classpath/embulk-input-oracle-0.8.2.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7eab9f730371efeebe6854a88e07408700823ee0
|
4
|
+
data.tar.gz: 1f7b6cd1baee130768aca701b2a24a5bfc25136a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39a7950675fad10c2284641e4838bab0ceb8c2cc934be34a6252ee57ec2f6c144dc00a0d8ecf64a1fb5b351a1e60870bd3c6b8dc87fd36474ba211d0b3b8ca50
|
7
|
+
data.tar.gz: 9b660cc8343c625445b75ade1fdc321136761271fb776451edb459b0fbd3a170bc1cf9fa67ec8be2dc013c5ebd00e1e6187ceedb3133e8f058cf709d721e8650
|
data/README.md
CHANGED
@@ -149,3 +149,22 @@ in:
|
|
149
149
|
```
|
150
150
|
$ ./gradlew gem
|
151
151
|
```
|
152
|
+
|
153
|
+
Running tests:
|
154
|
+
|
155
|
+
You need to add ojdbc7.jar to embulk-input-oracle/driver
|
156
|
+
|
157
|
+
Also oracle.yml is needed
|
158
|
+
```
|
159
|
+
type: oracle
|
160
|
+
host: localhost
|
161
|
+
port: 1521
|
162
|
+
database: xe
|
163
|
+
user: system
|
164
|
+
password: pass
|
165
|
+
```
|
166
|
+
|
167
|
+
To run tests for oracle project only
|
168
|
+
```
|
169
|
+
$ EMBULK_INPUT_ORACLE_TEST_CONFIG=oracle.yml ./gradlew :embulk-input-oracle:check --info
|
170
|
+
```
|
Binary file
|
Binary file
|
@@ -1,17 +1,20 @@
|
|
1
1
|
package org.embulk.input;
|
2
2
|
|
3
|
-
import
|
4
|
-
import java.sql.DriverManager;
|
5
|
-
import java.sql.SQLException;
|
6
|
-
import java.util.Properties;
|
7
|
-
|
3
|
+
import com.google.common.base.Optional;
|
8
4
|
import org.embulk.config.Config;
|
9
5
|
import org.embulk.config.ConfigDefault;
|
10
6
|
import org.embulk.input.jdbc.AbstractJdbcInputPlugin;
|
11
7
|
import org.embulk.input.jdbc.JdbcInputConnection;
|
8
|
+
import org.embulk.input.jdbc.getter.ColumnGetterFactory;
|
12
9
|
import org.embulk.input.oracle.OracleInputConnection;
|
10
|
+
import org.embulk.input.oracle.getter.OracleColumnGetterFactory;
|
11
|
+
import org.embulk.spi.PageBuilder;
|
12
|
+
import org.joda.time.DateTimeZone;
|
13
13
|
|
14
|
-
import
|
14
|
+
import java.sql.Connection;
|
15
|
+
import java.sql.DriverManager;
|
16
|
+
import java.sql.SQLException;
|
17
|
+
import java.util.Properties;
|
15
18
|
|
16
19
|
public class OracleInputPlugin
|
17
20
|
extends AbstractJdbcInputPlugin
|
@@ -130,4 +133,9 @@ public class OracleInputPlugin
|
|
130
133
|
}
|
131
134
|
}
|
132
135
|
|
136
|
+
@Override
|
137
|
+
protected ColumnGetterFactory newColumnGetterFactory(PageBuilder pageBuilder, DateTimeZone dateTimeZone) {
|
138
|
+
return new OracleColumnGetterFactory(pageBuilder, dateTimeZone);
|
139
|
+
}
|
140
|
+
|
133
141
|
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
package org.embulk.input.oracle.getter;
|
2
|
+
|
3
|
+
import org.embulk.input.jdbc.AbstractJdbcInputPlugin;
|
4
|
+
import org.embulk.input.jdbc.JdbcColumn;
|
5
|
+
import org.embulk.input.jdbc.JdbcColumnOption;
|
6
|
+
import org.embulk.input.jdbc.JdbcInputConnection;
|
7
|
+
import org.embulk.input.jdbc.getter.ColumnGetter;
|
8
|
+
import org.embulk.input.jdbc.getter.ColumnGetterFactory;
|
9
|
+
import org.embulk.input.jdbc.getter.TimestampWithoutTimeZoneIncrementalHandler;
|
10
|
+
import org.embulk.spi.PageBuilder;
|
11
|
+
import org.joda.time.DateTimeZone;
|
12
|
+
|
13
|
+
public class OracleColumnGetterFactory extends ColumnGetterFactory
|
14
|
+
{
|
15
|
+
|
16
|
+
public OracleColumnGetterFactory(PageBuilder to, DateTimeZone defaultTimeZone) {
|
17
|
+
super(to, defaultTimeZone);
|
18
|
+
}
|
19
|
+
|
20
|
+
@Override
|
21
|
+
public ColumnGetter newColumnGetter(JdbcInputConnection con, AbstractJdbcInputPlugin.PluginTask task, JdbcColumn column, JdbcColumnOption option)
|
22
|
+
{
|
23
|
+
|
24
|
+
ColumnGetter getter = super.newColumnGetter(con, task, column, option);
|
25
|
+
|
26
|
+
switch (column.getTypeName()) {
|
27
|
+
case "DATE":
|
28
|
+
return new TimestampWithoutTimeZoneIncrementalHandler(getter);
|
29
|
+
case "TIMESTAMP":
|
30
|
+
return new TimestampWithoutTimeZoneIncrementalHandler(getter);
|
31
|
+
default:
|
32
|
+
return getter;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
}
|
@@ -1,12 +1,5 @@
|
|
1
1
|
package org.embulk.input.oracle;
|
2
2
|
|
3
|
-
import static org.embulk.input.oracle.OracleTests.execute;
|
4
|
-
import static org.embulk.test.EmbulkTests.readSortedFile;
|
5
|
-
import static org.hamcrest.Matchers.is;
|
6
|
-
import static org.junit.Assert.assertThat;
|
7
|
-
|
8
|
-
import java.nio.file.Path;
|
9
|
-
|
10
3
|
import org.embulk.config.ConfigDiff;
|
11
4
|
import org.embulk.config.ConfigSource;
|
12
5
|
import org.embulk.input.OracleInputPlugin;
|
@@ -17,6 +10,13 @@ import org.junit.Before;
|
|
17
10
|
import org.junit.Rule;
|
18
11
|
import org.junit.Test;
|
19
12
|
|
13
|
+
import java.nio.file.Path;
|
14
|
+
|
15
|
+
import static org.embulk.input.oracle.OracleTests.execute;
|
16
|
+
import static org.embulk.test.EmbulkTests.readSortedFile;
|
17
|
+
import static org.hamcrest.Matchers.is;
|
18
|
+
import static org.junit.Assert.assertThat;
|
19
|
+
|
20
20
|
public class BasicTest
|
21
21
|
{
|
22
22
|
private static final String BASIC_RESOURCE_PATH = "org/embulk/input/oracle/test/expect/basic/";
|
@@ -0,0 +1,144 @@
|
|
1
|
+
package org.embulk.input.oracle;
|
2
|
+
|
3
|
+
import org.embulk.config.ConfigDiff;
|
4
|
+
import org.embulk.config.ConfigSource;
|
5
|
+
import org.embulk.input.OracleInputPlugin;
|
6
|
+
import org.embulk.spi.InputPlugin;
|
7
|
+
import org.embulk.test.EmbulkTests;
|
8
|
+
import org.embulk.test.TestingEmbulk;
|
9
|
+
import org.embulk.test.TestingEmbulk.RunResult;
|
10
|
+
import org.junit.Before;
|
11
|
+
import org.junit.Rule;
|
12
|
+
import org.junit.Test;
|
13
|
+
|
14
|
+
import java.nio.file.Path;
|
15
|
+
|
16
|
+
import static org.embulk.input.oracle.OracleTests.execute;
|
17
|
+
import static org.embulk.test.EmbulkTests.readSortedFile;
|
18
|
+
import static org.hamcrest.Matchers.is;
|
19
|
+
import static org.junit.Assert.assertThat;
|
20
|
+
|
21
|
+
public class IncrementalTest
|
22
|
+
{
|
23
|
+
private static final String BASIC_RESOURCE_PATH = "org/embulk/input/oracle/test/expect/incremental/";
|
24
|
+
|
25
|
+
private static ConfigSource loadYamlResource(TestingEmbulk embulk, String fileName)
|
26
|
+
{
|
27
|
+
return embulk.loadYamlResource(BASIC_RESOURCE_PATH + fileName);
|
28
|
+
}
|
29
|
+
|
30
|
+
private static String readResource(String fileName)
|
31
|
+
{
|
32
|
+
return EmbulkTests.readResource(BASIC_RESOURCE_PATH + fileName);
|
33
|
+
}
|
34
|
+
|
35
|
+
@Rule
|
36
|
+
public TestingEmbulk embulk = TestingEmbulk.builder()
|
37
|
+
.registerPlugin(InputPlugin.class, "oracle", OracleInputPlugin.class)
|
38
|
+
.build();
|
39
|
+
|
40
|
+
private ConfigSource baseConfig;
|
41
|
+
|
42
|
+
@Before
|
43
|
+
public void setup()
|
44
|
+
{
|
45
|
+
baseConfig = OracleTests.baseConfig();
|
46
|
+
}
|
47
|
+
|
48
|
+
@Test
|
49
|
+
public void simpleInt() throws Exception
|
50
|
+
{
|
51
|
+
// setup first rows
|
52
|
+
execute(embulk, readResource("int/setup.sql"));
|
53
|
+
|
54
|
+
Path out1 = embulk.createTempFile("csv");
|
55
|
+
RunResult result1 = embulk.runInput(
|
56
|
+
baseConfig.merge(loadYamlResource(embulk, "int/config_1.yml")),
|
57
|
+
out1);
|
58
|
+
assertThat(
|
59
|
+
readSortedFile(out1),
|
60
|
+
is(readResource("int/expected_1.csv")));
|
61
|
+
assertThat(
|
62
|
+
result1.getConfigDiff(),
|
63
|
+
is((ConfigDiff) loadYamlResource(embulk, "int/expected_1.diff")));
|
64
|
+
|
65
|
+
// insert more rows
|
66
|
+
execute(embulk, readResource("int/insert_more.sql"));
|
67
|
+
|
68
|
+
Path out2 = embulk.createTempFile("csv");
|
69
|
+
RunResult result2 = embulk.runInput(
|
70
|
+
baseConfig.merge(loadYamlResource(embulk, "int/config_2.yml")),
|
71
|
+
out2);
|
72
|
+
assertThat(
|
73
|
+
readSortedFile(out2),
|
74
|
+
is(readResource("int/expected_2.csv")));
|
75
|
+
assertThat(
|
76
|
+
result2.getConfigDiff(),
|
77
|
+
is((ConfigDiff) loadYamlResource(embulk, "int/expected_2.diff")));
|
78
|
+
}
|
79
|
+
|
80
|
+
@Test
|
81
|
+
public void simpleDate() throws Exception
|
82
|
+
{
|
83
|
+
// setup first rows
|
84
|
+
execute(embulk, readResource("date/setup.sql"));
|
85
|
+
|
86
|
+
Path out1 = embulk.createTempFile("csv");
|
87
|
+
RunResult result1 = embulk.runInput(
|
88
|
+
baseConfig.merge(loadYamlResource(embulk, "date/config_1.yml")),
|
89
|
+
out1);
|
90
|
+
assertThat(
|
91
|
+
readSortedFile(out1),
|
92
|
+
is(readResource("date/expected_1.csv")));
|
93
|
+
assertThat(
|
94
|
+
result1.getConfigDiff(),
|
95
|
+
is((ConfigDiff) loadYamlResource(embulk, "date/expected_1.diff")));
|
96
|
+
|
97
|
+
// insert more rows
|
98
|
+
execute(embulk, readResource("date/insert_more.sql"));
|
99
|
+
|
100
|
+
Path out2 = embulk.createTempFile("csv");
|
101
|
+
RunResult result2 = embulk.runInput(
|
102
|
+
baseConfig.merge(loadYamlResource(embulk, "date/config_2.yml")),
|
103
|
+
out2);
|
104
|
+
assertThat(
|
105
|
+
readSortedFile(out2),
|
106
|
+
is(readResource("date/expected_2.csv")));
|
107
|
+
assertThat(
|
108
|
+
result2.getConfigDiff(),
|
109
|
+
is((ConfigDiff) loadYamlResource(embulk, "date/expected_2.diff")));
|
110
|
+
}
|
111
|
+
|
112
|
+
@Test
|
113
|
+
public void simpleTimestamp() throws Exception
|
114
|
+
{
|
115
|
+
// setup first rows
|
116
|
+
execute(embulk, readResource("timestamp/setup.sql"));
|
117
|
+
|
118
|
+
Path out1 = embulk.createTempFile("csv");
|
119
|
+
RunResult result1 = embulk.runInput(
|
120
|
+
baseConfig.merge(loadYamlResource(embulk, "timestamp/config_1.yml")),
|
121
|
+
out1);
|
122
|
+
assertThat(
|
123
|
+
readSortedFile(out1),
|
124
|
+
is(readResource("timestamp/expected_1.csv")));
|
125
|
+
assertThat(
|
126
|
+
result1.getConfigDiff(),
|
127
|
+
is((ConfigDiff) loadYamlResource(embulk, "timestamp/expected_1.diff")));
|
128
|
+
|
129
|
+
// insert more rows
|
130
|
+
execute(embulk, readResource("timestamp/insert_more.sql"));
|
131
|
+
|
132
|
+
Path out2 = embulk.createTempFile("csv");
|
133
|
+
RunResult result2 = embulk.runInput(
|
134
|
+
baseConfig.merge(loadYamlResource(embulk, "timestamp/config_2.yml")),
|
135
|
+
out2);
|
136
|
+
assertThat(
|
137
|
+
readSortedFile(out2),
|
138
|
+
is(readResource("timestamp/expected_2.csv")));
|
139
|
+
assertThat(
|
140
|
+
result2.getConfigDiff(),
|
141
|
+
is((ConfigDiff) loadYamlResource(embulk, "timestamp/expected_2.diff")));
|
142
|
+
}
|
143
|
+
|
144
|
+
}
|
@@ -1,6 +1,10 @@
|
|
1
1
|
package org.embulk.input.oracle;
|
2
2
|
|
3
|
-
import
|
3
|
+
import com.google.common.base.Throwables;
|
4
|
+
import com.google.common.io.ByteStreams;
|
5
|
+
import org.embulk.config.ConfigSource;
|
6
|
+
import org.embulk.test.EmbulkTests;
|
7
|
+
import org.embulk.test.TestingEmbulk;
|
4
8
|
|
5
9
|
import java.io.IOException;
|
6
10
|
import java.nio.charset.Charset;
|
@@ -8,12 +12,7 @@ import java.nio.file.Files;
|
|
8
12
|
import java.nio.file.Path;
|
9
13
|
import java.util.Arrays;
|
10
14
|
|
11
|
-
import
|
12
|
-
import org.embulk.test.EmbulkTests;
|
13
|
-
import org.embulk.test.TestingEmbulk;
|
14
|
-
|
15
|
-
import com.google.common.base.Throwables;
|
16
|
-
import com.google.common.io.ByteStreams;
|
15
|
+
import static java.util.Locale.ENGLISH;
|
17
16
|
|
18
17
|
public class OracleTests
|
19
18
|
{
|
@@ -23,7 +22,7 @@ public class OracleTests
|
|
23
22
|
}
|
24
23
|
|
25
24
|
public static void execute(TestingEmbulk embulk, String sql) throws IOException
|
26
|
-
|
25
|
+
{
|
27
26
|
Path sqlFile = embulk.createTempFile("sql");
|
28
27
|
Files.write(sqlFile, Arrays.asList(sql), Charset.forName("UTF8"));
|
29
28
|
|
@@ -33,11 +32,12 @@ public class OracleTests
|
|
33
32
|
String user = config.get(String.class, "user");
|
34
33
|
String password = config.get(String.class, "password");
|
35
34
|
String database = config.get(String.class, "database");
|
35
|
+
|
36
36
|
ProcessBuilder pb = new ProcessBuilder(
|
37
|
-
"
|
37
|
+
"sql",
|
38
38
|
user + "/" + password + "@" + host + ":" + port + "/" + database,
|
39
39
|
"@" + sqlFile.toFile().getAbsolutePath());
|
40
|
-
pb.environment().put("
|
40
|
+
pb.environment().put("JAVA_TOOL_OPTIONS", "-Dfile.encoding=UTF8");
|
41
41
|
pb.redirectErrorStream(true);
|
42
42
|
int code;
|
43
43
|
try {
|
@@ -0,0 +1,5 @@
|
|
1
|
+
INSERT INTO load (dt, note) VALUES (TO_DATE('2016-11-02 04:00:00', 'YYYY-MM-DD HH24:MI:SS'), 'more_skip');
|
2
|
+
INSERT INTO load (dt, note) VALUES (TO_DATE('2016-11-02 04:00:06', 'YYYY-MM-DD HH24:MI:SS'), 'more_load');
|
3
|
+
INSERT INTO load (dt, note) VALUES (TO_DATE('2016-11-02 04:00:06', 'YYYY-MM-DD HH24:MI:SS'), 'more_load');
|
4
|
+
|
5
|
+
EXIT;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
DROP TABLE load;
|
2
|
+
|
3
|
+
CREATE TABLE load (
|
4
|
+
dt DATE NOT NULL,
|
5
|
+
note VARCHAR2(10)
|
6
|
+
);
|
7
|
+
|
8
|
+
INSERT INTO load (dt, note) VALUES (TO_DATE('2016-11-02 01:00:01', 'YYYY-MM-DD HH24:MI:SS'), 'first');
|
9
|
+
INSERT INTO load (dt, note) VALUES (TO_DATE('2016-11-02 02:00:02', 'YYYY-MM-DD HH24:MI:SS'), 'first');
|
10
|
+
INSERT INTO load (dt, note) VALUES (TO_DATE('2016-11-02 03:00:03', 'YYYY-MM-DD HH24:MI:SS'), 'first');
|
11
|
+
INSERT INTO load (dt, note) VALUES (TO_DATE('2016-11-02 04:00:04', 'YYYY-MM-DD HH24:MI:SS'), 'first');
|
12
|
+
|
13
|
+
EXIT;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
drop table int_load;
|
2
|
+
|
3
|
+
create table int_load (
|
4
|
+
num NUMBER(10) not null,
|
5
|
+
note VARCHAR2(10)
|
6
|
+
);
|
7
|
+
|
8
|
+
insert into int_load (num, note) values (3, 'first');
|
9
|
+
insert into int_load (num, note) values (4, 'first');
|
10
|
+
insert into int_load (num, note) values (2, 'first');
|
11
|
+
insert into int_load (num, note) values (1, 'first');
|
12
|
+
|
13
|
+
EXIT;
|
data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/expected_1.csv
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
2016-11-01 23:00:01.000000 +0000,first
|
2
|
+
2016-11-02 00:00:02.000000 +0000,first
|
3
|
+
2016-11-02 01:00:03.000000 +0000,first
|
4
|
+
2016-11-02 02:00:04.000000 +0000,first
|
5
|
+
2016-11-02 02:00:05.111001 +0000,first
|
6
|
+
2016-11-02 02:00:05.222002 +0000,first
|
7
|
+
2016-11-02 02:00:05.333003 +0000,first
|
data/src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/insert_more.sql
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 04:00:00', 'YYYY-MM-DD HH24:MI:SS'), 'more_skip');
|
2
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 04:00:05.333000', 'YYYY-MM-DD HH24:MI:SS.FF6'), 'more_skip');
|
3
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 04:00:05.333003', 'YYYY-MM-DD HH24:MI:SS.FF6'), 'more_skip');
|
4
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 04:00:05.333004', 'YYYY-MM-DD HH24:MI:SS.FF6'), 'more_load');
|
5
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 04:00:06', 'YYYY-MM-DD HH24:MI:SS'), 'more_load');
|
6
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 04:00:06', 'YYYY-MM-DD HH24:MI:SS'), 'more_load');
|
7
|
+
|
8
|
+
EXIT;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
DROP TABLE load;
|
2
|
+
|
3
|
+
CREATE TABLE load (
|
4
|
+
ts TIMESTAMP NOT NULL,
|
5
|
+
note VARCHAR2(10)
|
6
|
+
);
|
7
|
+
|
8
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 01:00:01', 'YYYY-MM-DD HH24:MI:SS'), 'first');
|
9
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 02:00:02', 'YYYY-MM-DD HH24:MI:SS'), 'first');
|
10
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 03:00:03', 'YYYY-MM-DD HH24:MI:SS'), 'first');
|
11
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 04:00:04', 'YYYY-MM-DD HH24:MI:SS'), 'first');
|
12
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 04:00:05.111001', 'YYYY-MM-DD HH24:MI:SS.FF6'), 'first');
|
13
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 04:00:05.222002', 'YYYY-MM-DD HH24:MI:SS.FF6'), 'first');
|
14
|
+
INSERT INTO load (ts, note) VALUES (TO_TIMESTAMP('2016-11-02 04:00:05.333003', 'YYYY-MM-DD HH24:MI:SS.FF6'), 'first');
|
15
|
+
|
16
|
+
EXIT;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-oracle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
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-
|
11
|
+
date: 2017-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Selects records from a table.
|
14
14
|
email:
|
@@ -19,12 +19,14 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- README.md
|
21
21
|
- build.gradle
|
22
|
-
- classpath/embulk-input-jdbc-0.8.
|
23
|
-
- classpath/embulk-input-oracle-0.8.
|
22
|
+
- classpath/embulk-input-jdbc-0.8.3.jar
|
23
|
+
- classpath/embulk-input-oracle-0.8.3.jar
|
24
24
|
- lib/embulk/input/oracle.rb
|
25
25
|
- src/main/java/org/embulk/input/OracleInputPlugin.java
|
26
26
|
- src/main/java/org/embulk/input/oracle/OracleInputConnection.java
|
27
|
+
- src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java
|
27
28
|
- src/test/java/org/embulk/input/oracle/BasicTest.java
|
29
|
+
- src/test/java/org/embulk/input/oracle/IncrementalTest.java
|
28
30
|
- src/test/java/org/embulk/input/oracle/OracleTests.java
|
29
31
|
- src/test/resources/org/embulk/input/oracle/test/expect/basic/setup.sql
|
30
32
|
- src/test/resources/org/embulk/input/oracle/test/expect/basic/test_column_options_config.yml
|
@@ -46,6 +48,30 @@ files:
|
|
46
48
|
- src/test/resources/org/embulk/input/oracle/test/expect/basic/test_unknown_type_expected2.diff
|
47
49
|
- src/test/resources/org/embulk/input/oracle/test/expect/basic/test_unknown_type_expected3.csv
|
48
50
|
- src/test/resources/org/embulk/input/oracle/test/expect/basic/test_unknown_type_expected3.diff
|
51
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/config_1.yml
|
52
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/config_2.yml
|
53
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/expected_1.csv
|
54
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/expected_1.diff
|
55
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/expected_2.csv
|
56
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/expected_2.diff
|
57
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/insert_more.sql
|
58
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/date/setup.sql
|
59
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/config_1.yml
|
60
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/config_2.yml
|
61
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/expected_1.csv
|
62
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/expected_1.diff
|
63
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/expected_2.csv
|
64
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/expected_2.diff
|
65
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/insert_more.sql
|
66
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/int/setup.sql
|
67
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/config_1.yml
|
68
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/config_2.yml
|
69
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/expected_1.csv
|
70
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/expected_1.diff
|
71
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/expected_2.csv
|
72
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/expected_2.diff
|
73
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/insert_more.sql
|
74
|
+
- src/test/resources/org/embulk/input/oracle/test/expect/incremental/timestamp/setup.sql
|
49
75
|
homepage: https://github.com/embulk/embulk-input-jdbc
|
50
76
|
licenses:
|
51
77
|
- Apache 2.0
|
Binary file
|