embulk-input-mysql 0.5.0 → 0.6.0
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 -1
- data/build.gradle +1 -1
- data/classpath/{embulk-input-jdbc-0.5.0.jar → embulk-input-jdbc-0.6.0.jar} +0 -0
- data/classpath/embulk-input-mysql-0.6.0.jar +0 -0
- data/src/test/java/org/embulk/input/mysql/EmbulkPluginTester.java +6 -2
- data/src/test/java/org/embulk/input/mysql/EmptyConfigSource.java +5 -0
- data/src/test/java/org/embulk/input/mysql/MySQLInputPluginTest.java +10 -10
- data/src/test/resources/yml/input-boolean.yml +7 -1
- data/src/test/resources/yml/input-double.yml +7 -1
- data/src/test/resources/yml/input-long.yml +7 -1
- data/src/test/resources/yml/input-string.yml +7 -1
- data/src/test/resources/yml/input-timestamp1.yml +17 -6
- data/src/test/resources/yml/input-timestamp2.yml +1 -1
- data/src/test/resources/yml/input-timestamp3.yml +1 -1
- data/src/test/resources/yml/input-valuetype-decimal.yml +1 -1
- data/src/test/resources/yml/input-valuetype-string.yml +1 -1
- data/src/test/resources/yml/input.yml +7 -1
- metadata +4 -4
- data/classpath/embulk-input-mysql-0.5.0.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: dd90341b77cceca9532bf385439c2437f8caf517
|
4
|
+
data.tar.gz: dd81a39ddc867c7e0c577096792d2178b237dfb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddd6c09b93413f5bcc36120ba1841193c4f3e662f9f2e8d1652f75c3ebc609113c7c6a144386ccb3ef8956c5eb383d9addfe7f3380f60eabf04b9ae40b6db47a
|
7
|
+
data.tar.gz: b7669585a6c96283717542589ed978b53b17c905c7d11cb41d63453e07cfe7783de1a8e73731226c830582d48d39d2393fea1d62e46e1c5f09b2cae8d4bfc2c0
|
data/README.md
CHANGED
@@ -38,7 +38,7 @@ MySQL input plugins for Embulk loads records from MySQL.
|
|
38
38
|
- **type**: Column values are converted to this embulk type.
|
39
39
|
Available values options are: `boolean`, `long`, `double`, `string`, `timestamp`).
|
40
40
|
By default, the embulk type is determined according to the sql type of the column (or value_type if specified).
|
41
|
-
- **timestamp_format**: If the sql type of the column is `date`/`time`/`datetime` and the embulk type is `string`, column values are formatted by this timestamp_format. And if the embulk type is `timestamp`, this timestamp_format
|
41
|
+
- **timestamp_format**: If the sql type of the column is `date`/`time`/`datetime` and the embulk type is `string`, column values are formatted by this timestamp_format. And if the embulk type is `timestamp`, this timestamp_format may be used in the output plugin. For example, stdout plugin use the timestamp_format, but *csv formatter plugin doesn't use*. (string, default : `%Y-%m-%d` for `date`, `%H:%M:%S` for `time`, `%Y-%m-%d %H:%M:%S` for `timestamp`)
|
42
42
|
- **timezone**: If the sql type of the column is `date`/`time`/`datetime` and the embulk type is `string`, column values are formatted in this timezone.
|
43
43
|
(string, value of default_timezone option is used by default)
|
44
44
|
|
data/build.gradle
CHANGED
Binary file
|
Binary file
|
@@ -74,8 +74,12 @@ public class EmbulkPluginTester
|
|
74
74
|
Injector injector = service.getInjector();
|
75
75
|
ConfigSource config = injector.getInstance(ConfigLoader.class).fromYamlFile(new File(ymlPath));
|
76
76
|
ExecSession session = new ExecSession(injector, config);
|
77
|
-
|
78
|
-
|
77
|
+
try {
|
78
|
+
BulkLoader loader = injector.getInstance(BulkLoader.class);
|
79
|
+
ExecutionResult result = loader.run(session, config);
|
80
|
+
} finally {
|
81
|
+
session.cleanup();
|
82
|
+
}
|
79
83
|
}
|
80
84
|
|
81
85
|
}
|
@@ -125,7 +125,7 @@ public class MySQLInputPluginTest
|
|
125
125
|
"c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
|
126
126
|
",,,,,,,,,,,,2015-06-04 14:45:06,,",
|
127
127
|
"99,9999,-99999999,-9999999999999999,1.2345000505447388,1.234567890123,-1234.0,1.2345678901234568E17,5678,xy,2015-06-03,2015-06-04 03:34:56,2015-06-04 14:45:06,23:04:02,2015-06-03 16:02:03"),
|
128
|
-
read("mysql-
|
128
|
+
read("mysql-input000.00.csv"));
|
129
129
|
}
|
130
130
|
}
|
131
131
|
|
@@ -139,7 +139,7 @@ public class MySQLInputPluginTest
|
|
139
139
|
"c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
|
140
140
|
",,,,,,,,,,,,2015-06-04 14:45:06,,",
|
141
141
|
"99,9999,-99999999,-9999999999999999,1.2345,1.234567890123,-1234,123456789012345678.12,5678,xy,2015-06-03,2015-06-04 03:34:56,2015-06-04 14:45:06,23:04:02,2015-06-03 16:02:03"),
|
142
|
-
read("mysql-
|
142
|
+
read("mysql-input000.00.csv"));
|
143
143
|
}
|
144
144
|
}
|
145
145
|
|
@@ -153,7 +153,7 @@ public class MySQLInputPluginTest
|
|
153
153
|
"c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
|
154
154
|
",,,,,,,,,,,,2015-06-04 14:45:06,,",
|
155
155
|
"true,true,false,false,true,true,false,true,,,2015-06-03,2015-06-04 03:34:56,2015-06-04 14:45:06,23:04:02,2015-06-03 16:02:03"),
|
156
|
-
read("mysql-
|
156
|
+
read("mysql-input000.00.csv"));
|
157
157
|
}
|
158
158
|
}
|
159
159
|
|
@@ -167,7 +167,7 @@ public class MySQLInputPluginTest
|
|
167
167
|
"c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
|
168
168
|
",,,,,,,,,,,,2015-06-04 14:45:06,,",
|
169
169
|
"99,9999,-99999999,-9999999999999999,1,1,-1234,123456789012345678,5678,,2015-06-03,2015-06-04 03:34:56,2015-06-04 14:45:06,23:04:02,2015-06-03 16:02:03"),
|
170
|
-
read("mysql-
|
170
|
+
read("mysql-input000.00.csv"));
|
171
171
|
}
|
172
172
|
}
|
173
173
|
|
@@ -181,7 +181,7 @@ public class MySQLInputPluginTest
|
|
181
181
|
"c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
|
182
182
|
",,,,,,,,,,,,2015-06-04 14:45:06,,",
|
183
183
|
"99.0,9999.0,-9.9999999E7,-1.0E16,1.2345000505447388,1.234567890123,-1234.0,1.2345678901234568E17,5678.0,,2015-06-03,2015-06-04 03:34:56,2015-06-04 14:45:06,23:04:02,2015-06-03 16:02:03"),
|
184
|
-
read("mysql-
|
184
|
+
read("mysql-input000.00.csv"));
|
185
185
|
}
|
186
186
|
}
|
187
187
|
|
@@ -195,7 +195,7 @@ public class MySQLInputPluginTest
|
|
195
195
|
"c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
|
196
196
|
",,,,,,,,,,,,2015/06/04 14:45:06,,",
|
197
197
|
"99,9999,-99999999,-9999999999999999,1.2345000505447388,1.234567890123,-1234.0,1.2345678901234568E17,5678,xy,2015/06/03,2015/06/04 03:34:56,2015/06/04 14:45:06,23-04-02,2015/06/03 16:02:03.123456"),
|
198
|
-
read("mysql-
|
198
|
+
read("mysql-input000.00.csv"));
|
199
199
|
}
|
200
200
|
}
|
201
201
|
|
@@ -209,7 +209,7 @@ public class MySQLInputPluginTest
|
|
209
209
|
"c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
|
210
210
|
",,,,,,,,,,,,2015/06/04 23:45:06,,",
|
211
211
|
"99,9999,-99999999,-9999999999999999,1.2345000505447388,1.234567890123,-1234.0,1.2345678901234568E17,5678,xy,2015/06/03,2015/06/04 03:34:56,2015/06/04 23:45:06,08-04-02,2015/06/03 16:02:03.123456"),
|
212
|
-
read("mysql-
|
212
|
+
read("mysql-input000.00.csv"));
|
213
213
|
}
|
214
214
|
}
|
215
215
|
|
@@ -223,7 +223,7 @@ public class MySQLInputPluginTest
|
|
223
223
|
"c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
|
224
224
|
",,,,,,,,,,,,2015/06/04 23:45:06,,",
|
225
225
|
"99,9999,-99999999,-9999999999999999,1.2345000505447388,1.234567890123,-1234.0,1.2345678901234568E17,5678,xy,2015/06/04,2015/06/04 12:34:56,2015/06/04 23:45:06,02-04-02,2015/06/04 01:02:03.123456"),
|
226
|
-
read("mysql-
|
226
|
+
read("mysql-input000.00.csv"));
|
227
227
|
}
|
228
228
|
}
|
229
229
|
|
@@ -236,7 +236,7 @@ public class MySQLInputPluginTest
|
|
236
236
|
assertEquals(Arrays.asList(
|
237
237
|
"c1",
|
238
238
|
"18446744073709551615"),
|
239
|
-
read("mysql-
|
239
|
+
read("mysql-input000.00.csv"));
|
240
240
|
}
|
241
241
|
}
|
242
242
|
|
@@ -249,7 +249,7 @@ public class MySQLInputPluginTest
|
|
249
249
|
assertEquals(Arrays.asList(
|
250
250
|
"c1",
|
251
251
|
"1.8446744073709552E19"),
|
252
|
-
read("mysql-
|
252
|
+
read("mysql-input000.00.csv"));
|
253
253
|
}
|
254
254
|
}
|
255
255
|
|
@@ -21,6 +21,12 @@ in:
|
|
21
21
|
out:
|
22
22
|
type: file
|
23
23
|
path_prefix: mysql-input
|
24
|
-
file_ext:
|
24
|
+
file_ext: csv
|
25
25
|
formatter:
|
26
26
|
type: csv
|
27
|
+
column_options:
|
28
|
+
c11: {format: '%Y-%m-%d'}
|
29
|
+
c12: {format: '%Y-%m-%d %H:%M:%S'}
|
30
|
+
c13: {format: '%Y-%m-%d %H:%M:%S'}
|
31
|
+
c14: {format: '%H:%M:%S'}
|
32
|
+
c15: {format: '%Y-%m-%d %H:%M:%S'}
|
@@ -21,6 +21,12 @@ in:
|
|
21
21
|
out:
|
22
22
|
type: file
|
23
23
|
path_prefix: mysql-input
|
24
|
-
file_ext:
|
24
|
+
file_ext: csv
|
25
25
|
formatter:
|
26
26
|
type: csv
|
27
|
+
column_options:
|
28
|
+
c11: {format: '%Y-%m-%d'}
|
29
|
+
c12: {format: '%Y-%m-%d %H:%M:%S'}
|
30
|
+
c13: {format: '%Y-%m-%d %H:%M:%S'}
|
31
|
+
c14: {format: '%H:%M:%S'}
|
32
|
+
c15: {format: '%Y-%m-%d %H:%M:%S'}
|
@@ -21,6 +21,12 @@ in:
|
|
21
21
|
out:
|
22
22
|
type: file
|
23
23
|
path_prefix: mysql-input
|
24
|
-
file_ext:
|
24
|
+
file_ext: csv
|
25
25
|
formatter:
|
26
26
|
type: csv
|
27
|
+
column_options:
|
28
|
+
c11: {format: '%Y-%m-%d'}
|
29
|
+
c12: {format: '%Y-%m-%d %H:%M:%S'}
|
30
|
+
c13: {format: '%Y-%m-%d %H:%M:%S'}
|
31
|
+
c14: {format: '%H:%M:%S'}
|
32
|
+
c15: {format: '%Y-%m-%d %H:%M:%S'}
|
@@ -21,6 +21,12 @@ in:
|
|
21
21
|
out:
|
22
22
|
type: file
|
23
23
|
path_prefix: mysql-input
|
24
|
-
file_ext:
|
24
|
+
file_ext: csv
|
25
25
|
formatter:
|
26
26
|
type: csv
|
27
|
+
column_options:
|
28
|
+
c11: {format: '%Y-%m-%d'}
|
29
|
+
c12: {format: '%Y-%m-%d %H:%M:%S'}
|
30
|
+
c13: {format: '%Y-%m-%d %H:%M:%S'}
|
31
|
+
c14: {format: '%H:%M:%S'}
|
32
|
+
c15: {format: '%Y-%m-%d %H:%M:%S'}
|
@@ -7,15 +7,26 @@ in:
|
|
7
7
|
table: test1
|
8
8
|
select: "*"
|
9
9
|
column_options:
|
10
|
-
c11: {type: timestamp, timestamp_format: '%Y/%m/%d'}
|
11
|
-
c12: {type: timestamp, timestamp_format: '%Y/%m/%d %H:%M:%S'}
|
12
|
-
c13: {type: timestamp, timestamp_format: '%Y/%m/%d %H:%M:%S', timezone: '+0900'}
|
13
|
-
c14: {type: timestamp, timestamp_format: '%H-%M-%S', timezone: '+0900'}
|
14
|
-
c15: {type: timestamp, timestamp_format: '%Y/%m/%d %H:%M:%S.%6N'}
|
10
|
+
#c11: {type: timestamp, timestamp_format: '%Y/%m/%d'}
|
11
|
+
#c12: {type: timestamp, timestamp_format: '%Y/%m/%d %H:%M:%S'}
|
12
|
+
#c13: {type: timestamp, timestamp_format: '%Y/%m/%d %H:%M:%S', timezone: '+0900'}
|
13
|
+
#c14: {type: timestamp, timestamp_format: '%H-%M-%S', timezone: '+0900'}
|
14
|
+
#c15: {type: timestamp, timestamp_format: '%Y/%m/%d %H:%M:%S.%6N'}
|
15
|
+
c11: {type: timestamp}
|
16
|
+
c12: {type: timestamp}
|
17
|
+
c13: {type: timestamp}
|
18
|
+
c14: {type: timestamp}
|
19
|
+
c15: {type: timestamp}
|
15
20
|
|
16
21
|
out:
|
17
22
|
type: file
|
18
23
|
path_prefix: mysql-input
|
19
|
-
file_ext:
|
24
|
+
file_ext: csv
|
20
25
|
formatter:
|
21
26
|
type: csv
|
27
|
+
column_options:
|
28
|
+
c11: {format: '%Y/%m/%d'}
|
29
|
+
c12: {format: '%Y/%m/%d %H:%M:%S'}
|
30
|
+
c13: {format: '%Y/%m/%d %H:%M:%S'}
|
31
|
+
c14: {format: '%H-%M-%S'}
|
32
|
+
c15: {format: '%Y/%m/%d %H:%M:%S.%6N'}
|
@@ -10,6 +10,12 @@ in:
|
|
10
10
|
out:
|
11
11
|
type: file
|
12
12
|
path_prefix: mysql-input
|
13
|
-
file_ext:
|
13
|
+
file_ext: csv
|
14
14
|
formatter:
|
15
15
|
type: csv
|
16
|
+
column_options:
|
17
|
+
c11: {format: '%Y-%m-%d'}
|
18
|
+
c12: {format: '%Y-%m-%d %H:%M:%S'}
|
19
|
+
c13: {format: '%Y-%m-%d %H:%M:%S'}
|
20
|
+
c14: {format: '%H:%M:%S'}
|
21
|
+
c15: {format: '%Y-%m-%d %H:%M:%S'}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-mysql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.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: 2015-
|
11
|
+
date: 2015-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Selects records from a table.
|
14
14
|
email:
|
@@ -36,8 +36,8 @@ files:
|
|
36
36
|
- src/test/resources/yml/input-valuetype-decimal.yml
|
37
37
|
- src/test/resources/yml/input-valuetype-string.yml
|
38
38
|
- src/test/resources/yml/input.yml
|
39
|
-
- classpath/embulk-input-jdbc-0.
|
40
|
-
- classpath/embulk-input-mysql-0.
|
39
|
+
- classpath/embulk-input-jdbc-0.6.0.jar
|
40
|
+
- classpath/embulk-input-mysql-0.6.0.jar
|
41
41
|
- classpath/mysql-connector-java-5.1.34.jar
|
42
42
|
homepage: https://github.com/embulk/embulk-input-jdbc
|
43
43
|
licenses:
|
Binary file
|