embulk-input-jdbc 0.6.3 → 0.6.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d64ee420864ebfe1de416471638a0df1348f9338
|
4
|
+
data.tar.gz: 79cfb08db0a917123d6964e2670b7df9d17b060a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 625c73db1ce05cd04aad35bf9a2da954f42a4042aab27009ae85029b84d845480413e6b6fad547474ac39bd495654d3e90ffb57ddda12ec00fe38144272fa008
|
7
|
+
data.tar.gz: dff6a93e278ad1a3803c142135164260d451c3c77de796f901a22d26a39b552f3f0247a42e1aa8193c01177e0c832ff2c58542da94e5b955a946de054c0c1039
|
Binary file
|
@@ -158,7 +158,9 @@ public abstract class AbstractJdbcInputPlugin
|
|
158
158
|
private Schema setupTask(JdbcInputConnection con, PluginTask task) throws SQLException
|
159
159
|
{
|
160
160
|
// build SELECT query and gets schema of its result
|
161
|
-
|
161
|
+
String query = getQuery(task, con);
|
162
|
+
logger.info("SQL: " + query);
|
163
|
+
JdbcSchema querySchema = con.getSchemaOfQuery(query);
|
162
164
|
task.setQuerySchema(querySchema);
|
163
165
|
|
164
166
|
// validate column_options
|
@@ -73,7 +73,6 @@ public class JdbcInputConnection
|
|
73
73
|
|
74
74
|
protected BatchSelect newBatchSelect(String query, int fetchRows, int queryTimeout) throws SQLException
|
75
75
|
{
|
76
|
-
logger.info("SQL: " + query);
|
77
76
|
PreparedStatement stmt = connection.prepareStatement(query);
|
78
77
|
stmt.setFetchSize(fetchRows);
|
79
78
|
stmt.setQueryTimeout(queryTimeout);
|
@@ -145,6 +144,11 @@ public class JdbcInputConnection
|
|
145
144
|
return identifierQuoteString + str + identifierQuoteString;
|
146
145
|
}
|
147
146
|
|
147
|
+
protected String buildTableName(String tableName)
|
148
|
+
{
|
149
|
+
return quoteIdentifierString(tableName);
|
150
|
+
}
|
151
|
+
|
148
152
|
public String buildSelectQuery(String tableName,
|
149
153
|
Optional<String> selectColumnList, Optional<String> whereCondition,
|
150
154
|
Optional<String> orderByColumn)
|
@@ -153,7 +157,7 @@ public class JdbcInputConnection
|
|
153
157
|
|
154
158
|
sb.append("SELECT ");
|
155
159
|
sb.append(selectColumnList.or("*"));
|
156
|
-
sb.append(" FROM ").append(
|
160
|
+
sb.append(" FROM ").append(buildTableName(tableName));
|
157
161
|
if (whereCondition.isPresent()) {
|
158
162
|
sb.append(" WHERE ").append(whereCondition.get());
|
159
163
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-jdbc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
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-01-
|
11
|
+
date: 2016-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Selects records from a table.
|
14
14
|
email:
|
@@ -40,7 +40,7 @@ files:
|
|
40
40
|
- src/main/java/org/embulk/input/jdbc/getter/StringColumnGetter.java
|
41
41
|
- src/main/java/org/embulk/input/jdbc/getter/TimeColumnGetter.java
|
42
42
|
- src/main/java/org/embulk/input/jdbc/getter/TimestampColumnGetter.java
|
43
|
-
- classpath/embulk-input-jdbc-0.6.
|
43
|
+
- classpath/embulk-input-jdbc-0.6.4.jar
|
44
44
|
homepage: https://github.com/embulk/embulk-input-jdbc
|
45
45
|
licenses:
|
46
46
|
- Apache 2.0
|