embulk-input-mysql 0.7.4 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d65e31e726e10978b8344a67b30a46f3af1258a
4
- data.tar.gz: 1d115ce7553877569ce718715da23cf4e0bf2afa
3
+ metadata.gz: 2144fd45cabb9eb049b87ef7307119912982544d
4
+ data.tar.gz: 18b30e932ba4ae4db386f1ead1d6b93780c94830
5
5
  SHA512:
6
- metadata.gz: 52efe309e9b8d560de590157ab894e8af0306b7fcc6bc863b9feceaf05e03ea08e7a8e296f75357b43f5f317cd19928083807c5236a4f9878ec435f44d4b2a2b
7
- data.tar.gz: e878ca3ada6b7dd3cd049e72da2d0d039ffd6993d771a76602284d272fe77ca2fe6c4d9377d0e09ba708b96a5538e6ce9d3b2b33412bf0c91638bf8d8fced4b9
6
+ metadata.gz: 82f1d70e1d75acfd47b71e1e679a4eb085dd4fbc22ef562807a1045b697f77f2980e64663807503a4b2fb55d93365b594ecd0b1f7492e597c5262bb3edce47b2
7
+ data.tar.gz: 3ee4d8e3dd1570c230fdcd0ac684122998d728df75c143b7ac2b70355b2d91268424d675dcde52dfc46baa358e1f4d3a3ecb68959dd1e3561f642b776551d909
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # MySQL input plugins for Embulk
1
+ # MySQL input plugin for Embulk
2
2
 
3
- MySQL input plugins for Embulk loads records from MySQL.
3
+ MySQL input plugin for Embulk loads records from MySQL.
4
4
 
5
5
  ## Overview
6
6
 
@@ -1,138 +1,119 @@
1
1
  package org.embulk.input.mysql;
2
2
 
3
- import java.io.File;
4
- import java.io.IOException;
5
- import java.net.URISyntaxException;
6
- import java.nio.charset.Charset;
7
- import java.nio.file.FileSystem;
8
- import java.nio.file.FileSystems;
9
- import java.nio.file.Files;
10
3
  import java.sql.Connection;
11
4
  import java.sql.DriverManager;
12
5
  import java.sql.SQLException;
13
- import java.sql.Statement;
14
6
  import java.util.Arrays;
15
- import java.util.List;
16
7
 
17
- import org.embulk.input.EmbulkPluginTester;
8
+ import org.embulk.input.AbstractJdbcInputPluginTest;
18
9
  import org.embulk.input.MySQLInputPlugin;
19
10
  import org.embulk.spi.InputPlugin;
20
- import org.junit.AfterClass;
21
- import org.junit.BeforeClass;
22
11
  import org.junit.Test;
23
12
 
24
13
  import static org.junit.Assert.assertEquals;
14
+ import static java.util.Locale.ENGLISH;
25
15
 
26
- public class MySQLInputPluginTest
16
+ public class MySQLInputPluginTest extends AbstractJdbcInputPluginTest
27
17
  {
28
- private static boolean prepared = false;
29
- private static EmbulkPluginTester tester = new EmbulkPluginTester(InputPlugin.class, "mysql", MySQLInputPlugin.class);
30
-
31
- @BeforeClass
32
- public static void prepare() throws SQLException
18
+ @Override
19
+ protected void prepare() throws SQLException
33
20
  {
34
- Connection connection;
21
+ tester.addPlugin(InputPlugin.class, "mysql", MySQLInputPlugin.class);
22
+
35
23
  try {
36
- connection = DriverManager.getConnection("jdbc:mysql://localhost/TESTDB", "TEST_USER", "test_pw");
24
+ connect();
37
25
  } catch (SQLException e) {
38
26
  System.err.println(e);
39
- System.err.println("Warning: prepare a schema on MySQL (database = 'TESTDB', user = 'TEST_USER', password = 'test_pw').");
27
+ System.err.println(String.format(ENGLISH, "Warning: prepare a schema on MySQL (server = %s, port = %d, database = %s, user = %s, password = %s).",
28
+ getHost(), getPort(), getDatabase(), getUser(), getPassword()));
40
29
  return;
41
30
  }
42
31
 
43
- try {
44
- try (Statement statement = connection.createStatement()) {
45
- String drop1 = "drop table if exists test1";
46
- statement.execute(drop1);
47
-
48
- String create1 =
49
- "create table test1 ("
50
- + "c1 tinyint,"
51
- + "c2 smallint,"
52
- + "c3 int,"
53
- + "c4 bigint,"
54
- + "c5 float,"
55
- + "c6 double,"
56
- + "c7 decimal(4,0),"
57
- + "c8 decimal(20,2),"
58
- + "c9 char(4),"
59
- + "c10 varchar(4),"
60
- + "c11 date,"
61
- + "c12 datetime,"
62
- + "c13 timestamp,"
63
- + "c14 time,"
64
- + "c15 datetime(6));";
65
- statement.execute(create1);
66
-
67
- String insert1 =
68
- "insert into test1 values("
69
- + "null,"
70
- + "null,"
71
- + "null,"
72
- + "null,"
73
- + "null,"
74
- + "null,"
75
- + "null,"
76
- + "null,"
77
- + "null,"
78
- + "null,"
79
- + "null,"
80
- + "null,"
81
- + "'2015-06-04 23:45:06',"
82
- + "null,"
83
- + "null);";
84
- statement.executeUpdate(insert1);
85
-
86
- String insert2 =
87
- "insert into test1 values("
88
- + "99,"
89
- + "9999,"
90
- + "-99999999,"
91
- + "-9999999999999999,"
92
- + "1.2345,"
93
- + "1.234567890123,"
94
- + "-1234,"
95
- + "123456789012345678.12,"
96
- + "'5678',"
97
- + "'xy',"
98
- + "'2015-06-04',"
99
- + "'2015-06-04 12:34:56',"
100
- + "'2015-06-04 23:45:06',"
101
- + "'08:04:02',"
102
- + "'2015-06-04 01:02:03.123456');";
103
- statement.executeUpdate(insert2);
104
-
105
- String drop2 = "drop table if exists test2";
106
- statement.execute(drop2);
107
-
108
- String create2 = "create table test2 (c1 bigint unsigned);";
109
- statement.execute(create2);
110
-
111
- String insert3 = "insert into test2 values(18446744073709551615)";
112
- statement.executeUpdate(insert3);
113
- }
114
-
115
- } finally {
116
- connection.close();
117
- prepared = true;
118
- }
119
- }
120
-
121
- @AfterClass
122
- public static void dispose()
123
- {
124
- tester.destroy();
32
+ enabled = true;
33
+
34
+ String drop1 = "drop table if exists test1";
35
+ executeSQL(drop1);
36
+
37
+ String create1 =
38
+ "create table test1 ("
39
+ + "id char(2),"
40
+ + "c1 tinyint,"
41
+ + "c2 smallint,"
42
+ + "c3 int,"
43
+ + "c4 bigint,"
44
+ + "c5 float,"
45
+ + "c6 double,"
46
+ + "c7 decimal(4,0),"
47
+ + "c8 decimal(20,2),"
48
+ + "c9 char(4),"
49
+ + "c10 varchar(4),"
50
+ + "c11 date,"
51
+ + "c12 datetime,"
52
+ + "c13 timestamp,"
53
+ + "c14 time,"
54
+ + "c15 datetime(6),"
55
+ + "primary key(id));";
56
+ executeSQL(create1);
57
+
58
+ String insert1 =
59
+ "insert into test1 values("
60
+ + "'10',"
61
+ + "null,"
62
+ + "null,"
63
+ + "null,"
64
+ + "null,"
65
+ + "null,"
66
+ + "null,"
67
+ + "null,"
68
+ + "null,"
69
+ + "null,"
70
+ + "null,"
71
+ + "null,"
72
+ + "null,"
73
+ + "'2015-06-04 23:45:06',"
74
+ + "null,"
75
+ + "null);";
76
+ executeSQL(insert1);
77
+
78
+ String insert2 =
79
+ "insert into test1 values("
80
+ + "'11',"
81
+ + "99,"
82
+ + "9999,"
83
+ + "-99999999,"
84
+ + "-9999999999999999,"
85
+ + "1.2345,"
86
+ + "1.234567890123,"
87
+ + "-1234,"
88
+ + "123456789012345678.12,"
89
+ + "'5678',"
90
+ + "'xy',"
91
+ + "'2015-06-04',"
92
+ + "'2015-06-04 12:34:56',"
93
+ + "'2015-06-04 23:45:06',"
94
+ + "'08:04:02',"
95
+ + "'2015-06-04 01:02:03.123456');";
96
+ executeSQL(insert2);
97
+
98
+ String drop2 = "drop table if exists test2";
99
+ executeSQL(drop2);
100
+
101
+ String create2 = "create table test2 (c1 bigint unsigned);";
102
+ executeSQL(create2);
103
+
104
+ String insert3 = "insert into test2 values(18446744073709551615)";
105
+ executeSQL(insert3);
125
106
  }
126
107
 
127
108
  @Test
128
109
  public void test() throws Exception
129
110
  {
130
- if (prepared) {
131
- tester.run(convertPath("/mysql/yml/input.yml"));
111
+ if (enabled) {
112
+ test("/mysql/yml/input.yml");
132
113
  assertEquals(Arrays.asList(
133
- "c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
134
- ",,,,,,,,,,,,2015-06-04 14:45:06,,",
135
- "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"),
114
+ "id,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
115
+ "10,,,,,,,,,,,,,2015-06-04 14:45:06,,",
116
+ "11,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"),
136
117
  read("mysql-input000.00.csv"));
137
118
  }
138
119
  }
@@ -140,12 +121,12 @@ public class MySQLInputPluginTest
140
121
  @Test
141
122
  public void testString() throws Exception
142
123
  {
143
- if (prepared) {
144
- tester.run(convertPath("/mysql/yml/input-string.yml"));
124
+ if (enabled) {
125
+ test("/mysql/yml/input-string.yml");
145
126
  assertEquals(Arrays.asList(
146
- "c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
147
- ",,,,,,,,,,,,2015-06-04 14:45:06,,",
148
- "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"),
127
+ "id,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
128
+ "10,,,,,,,,,,,,,2015-06-04 14:45:06,,",
129
+ "11,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"),
149
130
  read("mysql-input000.00.csv"));
150
131
  }
151
132
  }
@@ -153,12 +134,12 @@ public class MySQLInputPluginTest
153
134
  @Test
154
135
  public void testBoolean() throws Exception
155
136
  {
156
- if (prepared) {
157
- tester.run(convertPath("/mysql/yml/input-boolean.yml"));
137
+ if (enabled) {
138
+ test("/mysql/yml/input-boolean.yml");
158
139
  assertEquals(Arrays.asList(
159
- "c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
160
- ",,,,,,,,,,,,2015-06-04 14:45:06,,",
161
- "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"),
140
+ "id,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
141
+ "10,,,,,,,,,,,,,2015-06-04 14:45:06,,",
142
+ "11,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"),
162
143
  read("mysql-input000.00.csv"));
163
144
  }
164
145
  }
@@ -166,12 +147,12 @@ public class MySQLInputPluginTest
166
147
  @Test
167
148
  public void testLong() throws Exception
168
149
  {
169
- if (prepared) {
170
- tester.run(convertPath("/mysql/yml/input-long.yml"));
150
+ if (enabled) {
151
+ test("/mysql/yml/input-long.yml");
171
152
  assertEquals(Arrays.asList(
172
- "c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
173
- ",,,,,,,,,,,,2015-06-04 14:45:06,,",
174
- "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"),
153
+ "id,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
154
+ "10,,,,,,,,,,,,,2015-06-04 14:45:06,,",
155
+ "11,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"),
175
156
  read("mysql-input000.00.csv"));
176
157
  }
177
158
  }
@@ -179,12 +160,12 @@ public class MySQLInputPluginTest
179
160
  @Test
180
161
  public void testDouble() throws Exception
181
162
  {
182
- if (prepared) {
183
- tester.run(convertPath("/mysql/yml/input-double.yml"));
163
+ if (enabled) {
164
+ test("/mysql/yml/input-double.yml");
184
165
  assertEquals(Arrays.asList(
185
- "c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
186
- ",,,,,,,,,,,,2015-06-04 14:45:06,,",
187
- "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"),
166
+ "id,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
167
+ "10,,,,,,,,,,,,,2015-06-04 14:45:06,,",
168
+ "11,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"),
188
169
  read("mysql-input000.00.csv"));
189
170
  }
190
171
  }
@@ -192,12 +173,12 @@ public class MySQLInputPluginTest
192
173
  @Test
193
174
  public void testTimestamp1() throws Exception
194
175
  {
195
- if (prepared) {
196
- tester.run(convertPath("/mysql/yml/input-timestamp1.yml"));
176
+ if (enabled) {
177
+ test("/mysql/yml/input-timestamp1.yml");
197
178
  assertEquals(Arrays.asList(
198
- "c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
199
- ",,,,,,,,,,,,2015/06/04 14:45:06,,",
200
- "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"),
179
+ "id,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
180
+ "10,,,,,,,,,,,,,2015/06/04 14:45:06,,",
181
+ "11,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"),
201
182
  read("mysql-input000.00.csv"));
202
183
  }
203
184
  }
@@ -205,12 +186,12 @@ public class MySQLInputPluginTest
205
186
  @Test
206
187
  public void testTimestamp2() throws Exception
207
188
  {
208
- if (prepared) {
209
- tester.run(convertPath("/mysql/yml/input-timestamp2.yml"));
189
+ if (enabled) {
190
+ test("/mysql/yml/input-timestamp2.yml");
210
191
  assertEquals(Arrays.asList(
211
- "c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
212
- ",,,,,,,,,,,,2015/06/04 23:45:06,,",
213
- "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"),
192
+ "id,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
193
+ "10,,,,,,,,,,,,,2015/06/04 23:45:06,,",
194
+ "11,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"),
214
195
  read("mysql-input000.00.csv"));
215
196
  }
216
197
  }
@@ -218,12 +199,12 @@ public class MySQLInputPluginTest
218
199
  @Test
219
200
  public void testTimestamp3() throws Exception
220
201
  {
221
- if (prepared) {
222
- tester.run(convertPath("/mysql/yml/input-timestamp3.yml"));
202
+ if (enabled) {
203
+ test("/mysql/yml/input-timestamp3.yml");
223
204
  assertEquals(Arrays.asList(
224
- "c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
225
- ",,,,,,,,,,,,2015/06/04 23:45:06,,",
226
- "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"),
205
+ "id,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15",
206
+ "10,,,,,,,,,,,,,2015/06/04 23:45:06,,",
207
+ "11,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"),
227
208
  read("mysql-input000.00.csv"));
228
209
  }
229
210
  }
@@ -231,8 +212,8 @@ public class MySQLInputPluginTest
231
212
  @Test
232
213
  public void testValueTypeString() throws Exception
233
214
  {
234
- if (prepared) {
235
- tester.run(convertPath("/mysql/yml/input-valuetype-string.yml"));
215
+ if (enabled) {
216
+ test("/mysql/yml/input-valuetype-string.yml");
236
217
  assertEquals(Arrays.asList(
237
218
  "c1",
238
219
  "18446744073709551615"),
@@ -243,8 +224,8 @@ public class MySQLInputPluginTest
243
224
  @Test
244
225
  public void testValueTypeDecimal() throws Exception
245
226
  {
246
- if (prepared) {
247
- tester.run(convertPath("/mysql/yml/input-valuetype-decimal.yml"));
227
+ if (enabled) {
228
+ test("/mysql/yml/input-valuetype-decimal.yml");
248
229
  assertEquals(Arrays.asList(
249
230
  "c1",
250
231
  "1.8446744073709552E19"),
@@ -252,17 +233,10 @@ public class MySQLInputPluginTest
252
233
  }
253
234
  }
254
235
 
255
- private List<String> read(String path) throws IOException
236
+ @Override
237
+ protected Connection connect() throws SQLException
256
238
  {
257
- FileSystem fs = FileSystems.getDefault();
258
- return Files.readAllLines(fs.getPath(path), Charset.defaultCharset());
259
- }
260
-
261
- private String convertPath(String name) throws URISyntaxException
262
- {
263
- if (getClass().getResource(name) == null) {
264
- return name;
265
- }
266
- return new File(getClass().getResource(name).toURI()).getAbsolutePath();
239
+ return DriverManager.getConnection(String.format(ENGLISH, "jdbc:mysql://%s:%d/%s", getHost(), getPort(), getDatabase()),
240
+ getUser(), getPassword());
267
241
  }
268
242
  }
@@ -1,11 +1,12 @@
1
1
  in:
2
2
  type: mysql
3
- host: localhost
4
- database: TESTDB
5
- user: TEST_USER
6
- password: test_pw
3
+ host: #host#
4
+ database: #database#
5
+ user: #user#
6
+ password: #password#
7
7
  table: test1
8
8
  select: "*"
9
+ order_by: "id"
9
10
  column_options:
10
11
  c1: {type: boolean}
11
12
  c2: {type: boolean}
@@ -1,11 +1,12 @@
1
1
  in:
2
2
  type: mysql
3
- host: localhost
4
- database: TESTDB
5
- user: TEST_USER
6
- password: test_pw
3
+ host: #host#
4
+ database: #database#
5
+ user: #user#
6
+ password: #password#
7
7
  table: test1
8
8
  select: "*"
9
+ order_by: "id"
9
10
  column_options:
10
11
  c1: {type: double}
11
12
  c2: {type: double}
@@ -1,11 +1,12 @@
1
1
  in:
2
2
  type: mysql
3
- host: localhost
4
- database: TESTDB
5
- user: TEST_USER
6
- password: test_pw
3
+ host: #host#
4
+ database: #database#
5
+ user: #user#
6
+ password: #password#
7
7
  table: test1
8
8
  select: "*"
9
+ order_by: "id"
9
10
  column_options:
10
11
  c1: {type: long}
11
12
  c2: {type: long}
@@ -1,11 +1,12 @@
1
1
  in:
2
2
  type: mysql
3
- host: localhost
4
- database: TESTDB
5
- user: TEST_USER
6
- password: test_pw
3
+ host: #host#
4
+ database: #database#
5
+ user: #user#
6
+ password: #password#
7
7
  table: test1
8
8
  select: "*"
9
+ order_by: "id"
9
10
  column_options:
10
11
  c1: {type: string}
11
12
  c2: {type: string}
@@ -1,11 +1,12 @@
1
1
  in:
2
2
  type: mysql
3
- host: localhost
4
- database: TESTDB
5
- user: TEST_USER
6
- password: test_pw
3
+ host: #host#
4
+ database: #database#
5
+ user: #user#
6
+ password: #password#
7
7
  table: test1
8
8
  select: "*"
9
+ order_by: "id"
9
10
  column_options:
10
11
  #c11: {type: timestamp, timestamp_format: '%Y/%m/%d'}
11
12
  #c12: {type: timestamp, timestamp_format: '%Y/%m/%d %H:%M:%S'}
@@ -1,11 +1,12 @@
1
1
  in:
2
2
  type: mysql
3
- host: localhost
4
- database: TESTDB
5
- user: TEST_USER
6
- password: test_pw
3
+ host: #host#
4
+ database: #database#
5
+ user: #user#
6
+ password: #password#
7
7
  table: test1
8
8
  select: "*"
9
+ order_by: "id"
9
10
  column_options:
10
11
  c11: {type: string, timestamp_format: '%Y/%m/%d'}
11
12
  c12: {type: string, timestamp_format: '%Y/%m/%d %H:%M:%S'}
@@ -1,11 +1,12 @@
1
1
  in:
2
2
  type: mysql
3
- host: localhost
4
- database: TESTDB
5
- user: TEST_USER
6
- password: test_pw
3
+ host: #host#
4
+ database: #database#
5
+ user: #user#
6
+ password: #password#
7
7
  table: test1
8
8
  select: "*"
9
+ order_by: "id"
9
10
  default_timezone: '+0900'
10
11
  column_options:
11
12
  c11: {type: string, timestamp_format: '%Y/%m/%d'}
@@ -1,9 +1,9 @@
1
1
  in:
2
2
  type: mysql
3
- host: localhost
4
- database: TESTDB
5
- user: TEST_USER
6
- password: test_pw
3
+ host: #host#
4
+ database: #database#
5
+ user: #user#
6
+ password: #password#
7
7
  table: test2
8
8
  select: "*"
9
9
  column_options:
@@ -1,9 +1,9 @@
1
1
  in:
2
2
  type: mysql
3
- host: localhost
4
- database: TESTDB
5
- user: TEST_USER
6
- password: test_pw
3
+ host: #host#
4
+ database: #database#
5
+ user: #user#
6
+ password: #password#
7
7
  table: test2
8
8
  select: "*"
9
9
  column_options:
@@ -1,11 +1,12 @@
1
1
  in:
2
2
  type: mysql
3
- host: localhost
4
- database: TESTDB
5
- user: TEST_USER
6
- password: test_pw
3
+ host: #host#
4
+ database: #database#
5
+ user: #user#
6
+ password: #password#
7
7
  table: test1
8
8
  select: "*"
9
+ order_by: "id"
9
10
 
10
11
  out:
11
12
  type: file
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.7.4
4
+ version: 0.8.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-09-28 00:00:00.000000000 Z
11
+ date: 2016-10-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Selects records from 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-input-jdbc-0.7.4.jar
23
- - classpath/embulk-input-mysql-0.7.4.jar
22
+ - classpath/embulk-input-jdbc-0.8.0.jar
23
+ - classpath/embulk-input-mysql-0.8.0.jar
24
24
  - classpath/mysql-connector-java-5.1.34.jar
25
25
  - lib/embulk/input/mysql.rb
26
26
  - src/main/java/org/embulk/input/MySQLInputPlugin.java