embulk-input-redshift 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6e8c344685265804a7323eab781eaf7bf87653bf
4
- data.tar.gz: 95dd684c86cbc4fd44a10839a1949e7c44245053
2
+ SHA256:
3
+ metadata.gz: 9c54964bbf0155adb050eeb74010c7623121ed3c01e4cd61a7bb61924c9fdcd2
4
+ data.tar.gz: 6a8cda4203c69b5c5ff3045c75e833c06111cfacb419c257676c4fdc7f67fb4b
5
5
  SHA512:
6
- metadata.gz: c18d9405bbfb2609223c193679704bfcf6cfbc594d948603b9609b321a9b06e7710daf0e677287c9f972a1216790de77d6713b5d50158177531e558150762d4a
7
- data.tar.gz: 71011ae9e8f7077807a73b3c3d72785c624a4336fae8a5e33e9a2695ea2ba87cd9f71f1ea4a74e549ec32444956ac6e6f49a99e079f9884044d1c2b1750d4397
6
+ metadata.gz: 4882f793a635c81330746bab77fec9467cd3c250fd6c64107f2d0826cff2a7a37e31912dbeb9fcdac4d5dcf32cfcb64ad83b26b80deb72693361bdd5f8ed29fa
7
+ data.tar.gz: 518f1f94e44b5606251afe4616bf964b90b5e6be83760668c9e2237f344922de8f40e495dfffd663412e1232011d89f16323d079a5dfa36d37b3762786d88014
data/README.md CHANGED
@@ -33,7 +33,8 @@ Redshift input plugin for Embulk loads records from Redshift.
33
33
  - **incremental_columns**: column names for incremental loading (array of strings, default: use primary keys)
34
34
  - **last_record**: values of the last record for incremental loading (array of objects, default: load all records)
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
- - **column_options**: advanced: a key-value pairs where key is a column name and value is options for the column.
36
+ - **default_column_options**: advanced: column_options for each JDBC type as default. key-value pairs where key is a JDBC type (e.g. 'DATE', 'BIGINT') and value is same as column_options's value.
37
+ - **column_options**: advanced: key-value pairs where key is a column name and value is options for the column.
37
38
  - **value_type**: embulk get values from database as this value_type. Typically, the value_type determines `getXXX` method of `java.sql.PreparedStatement`.
38
39
  (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
40
  - **type**: Column values are converted to this embulk type.
@@ -42,6 +43,8 @@ Redshift input plugin for Embulk loads records from Redshift.
42
43
  - **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
44
  - **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
45
  (string, value of default_timezone option is used by default)
46
+ - **before_setup**: if set, this SQL will be executed before setup. You can prepare table for input by this option.
47
+ - **before_select**: if set, this SQL will be executed before the SELECT query in the same transaction.
45
48
  - **after_select**: if set, this SQL will be executed after the SELECT query in the same transaction.
46
49
 
47
50
 
@@ -78,7 +81,7 @@ Then, it updates `last_record: ` so that next execution uses the updated last_re
78
81
  CREATE INDEX embulk_incremental_loading_index ON table (updated_at, id);
79
82
  ```
80
83
 
81
- Recommended usage is to leave `incremental_columns` unset and let this plugin automatically finds an auto-increment (IDENTITY) primary key. Currently, only strings and integers are supported as incremental_columns.
84
+ Recommended usage is to leave `incremental_columns` unset and let this plugin automatically finds an auto-increment (IDENTITY) primary key. Currently, only strings, integers, TIMESTAMP and TIMESTAMPTZ are supported as incremental_columns.
82
85
 
83
86
  ### Use incremental loading with raw query
84
87
 
@@ -165,6 +168,9 @@ in:
165
168
  table: "my_table"
166
169
  select: "col1, col2, col3"
167
170
  where: "col4 != 'a'"
171
+ default_column_options:
172
+ TIMESTAMP: { type: string, timestamp_format: "%Y/%m/%d %H:%M:%S", timezone: "+0900"}
173
+ BIGINT: { type: string }
168
174
  column_options:
169
175
  col1: {type: long}
170
176
  col3: {type: string, timestamp_format: "%Y/%m/%d", timezone: "+0900"}
@@ -4,5 +4,5 @@ dependencies {
4
4
 
5
5
  testCompile project(':embulk-input-jdbc').sourceSets.test.output
6
6
 
7
- testCompile 'org.embulk:embulk-standards:0.8.15'
7
+ testCompile 'org.embulk:embulk-standards:0.9.12'
8
8
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-redshift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.10.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: 2018-08-10 00:00:00.000000000 Z
11
+ date: 2019-05-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Selects records from a table.
14
14
  email:
@@ -19,9 +19,9 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - README.md
21
21
  - build.gradle
22
- - classpath/embulk-input-jdbc-0.9.3.jar
23
- - classpath/embulk-input-postgresql-0.9.3.jar
24
- - classpath/embulk-input-redshift-0.9.3.jar
22
+ - classpath/embulk-input-jdbc-0.10.0.jar
23
+ - classpath/embulk-input-postgresql-0.10.0.jar
24
+ - classpath/embulk-input-redshift-0.10.0.jar
25
25
  - classpath/postgresql-9.4-1205-jdbc41.jar
26
26
  - lib/embulk/input/redshift.rb
27
27
  - src/main/java/org/embulk/input/RedshiftInputPlugin.java
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 2.4.8
89
+ rubygems_version: 2.6.13
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: JDBC input plugin for Embulk