embulk-input-sqlserver 0.6.4 → 0.7.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: 2cb4a498b4bad8202c9c613b9b8c8f68daf31535
4
- data.tar.gz: 1bdc272d08a648a3b1174f31bec6faaf5e692f0a
3
+ metadata.gz: 69d0ef968a3614fd3e709e0ec5ae328c590eb1a9
4
+ data.tar.gz: 646632ea8e7020effa9cf76bca0f498a0b99c993
5
5
  SHA512:
6
- metadata.gz: b194b0688289014d401998a77c82895012649b012f8c5e2a6a1b616dcb4270fabd7cf7364a500580bff2bda6419a9004d99ce2e86492d035ba952350ce34b9f2
7
- data.tar.gz: 612ef59beba25aa306a93054d74c22ff81b4f96aee4c596cb734cbd786dc6a16d1ee40de766b27d66d8114c8829355771416aeaa5d41bb99dc881d82cd084a2c
6
+ metadata.gz: a2c5c6fa179400425752e2a5ed183b1f6eb19282bb88fb603e3ea93c97b139db390d0cd4af1cc7b8e75bcb4eb52723a04766a44abf11bdc622edbfc931de8d76
7
+ data.tar.gz: 167af326925613fc6b6c27ae43b4c8909d2545ce74709c5d10bd13e6065ccbdb7b5ee804987d2a1e9aae2833de0f7c288004a570479f8fad4b995db036a39542
data/README.md CHANGED
@@ -35,13 +35,14 @@ embulk "-J-Djava.library.path=C:\drivers" run input-sqlserver.yml
35
35
  - **default_timezone**: If the sql type of a column is `date`/`time`/`datetime` and the embulk type is `string`, column values are formatted int this default_timezone. You can overwrite timezone for each columns using column_options option. (string, default: `UTC`)
36
36
  - **column_options**: advanced: a key-value pairs where key is a column name and value is options for the column.
37
37
  - **value_type**: embulk get values from database as this value_type. Typically, the value_type determines `getXXX` method of `java.sql.PreparedStatement`.
38
- (string, default: depends on the sql type of the column. Available values options are: `long`, `double`, `float`, `decimal`, `boolean`, `string`, `date`, `time`, `timestamp`)
38
+ (string, default: depends on the sql type of the column. Available values options are: `long`, `double`, `float`, `decimal`, `boolean`, `string`, `json`, `date`, `time`, `timestamp`)
39
39
  - **type**: Column values are converted to this embulk type.
40
- Available values options are: `boolean`, `long`, `double`, `string`, `timestamp`).
40
+ Available values options are: `boolean`, `long`, `double`, `string`, `json`, `timestamp`).
41
41
  By default, the embulk type is determined according to the sql type of the column (or value_type if specified).
42
42
  - **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`)
43
43
  - **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.
44
44
  (string, value of default_timezone option is used by default)
45
+ - **after_select**: if set, this SQL will be executed after the SELECT query in the same transaction.
45
46
 
46
47
  ## Example
47
48
 
@@ -94,6 +95,7 @@ in:
94
95
  column_options:
95
96
  col1: {type: long}
96
97
  col3: {type: string, timestamp_format: "%Y/%m/%d", timezone: "+0900"}
98
+ after_select: "update my_table set col5 = '1' where col4 != 'a'"
97
99
 
98
100
  ```
99
101
 
@@ -89,8 +89,8 @@ public class SQLServerInputPlugin
89
89
  }
90
90
  StringBuilder urlBuilder = new StringBuilder();
91
91
  if (sqlServerTask.getInstance().isPresent()) {
92
- urlBuilder.append(String.format("jdbc:sqlserver://%s\\%s:%d",
93
- sqlServerTask.getHost().get(), sqlServerTask.getInstance().get(), sqlServerTask.getPort()));
92
+ urlBuilder.append(String.format("jdbc:sqlserver://%s\\%s",
93
+ sqlServerTask.getHost().get(), sqlServerTask.getInstance().get()));
94
94
  } else {
95
95
  urlBuilder.append(String.format("jdbc:sqlserver://%s:%d",
96
96
  sqlServerTask.getHost().get(), sqlServerTask.getPort()));
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-sqlserver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.7.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-01-15 00:00:00.000000000 Z
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Selects records from a table.
14
14
  email:
@@ -22,8 +22,8 @@ files:
22
22
  - lib/embulk/input/sqlserver.rb
23
23
  - src/main/java/org/embulk/input/SQLServerInputPlugin.java
24
24
  - src/main/java/org/embulk/input/sqlserver/SQLServerInputConnection.java
25
- - classpath/embulk-input-jdbc-0.6.4.jar
26
- - classpath/embulk-input-sqlserver-0.6.4.jar
25
+ - classpath/embulk-input-jdbc-0.7.0.jar
26
+ - classpath/embulk-input-sqlserver-0.7.0.jar
27
27
  homepage: https://github.com/embulk/embulk-input-jdbc
28
28
  licenses:
29
29
  - Apache 2.0