embulk 0.8.11 → 0.8.12

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: 81c887e218fd9d238dec965be53e323c01f44d50
4
- data.tar.gz: 18070eab3f000095620d8ad225c1fb2409bd3469
3
+ metadata.gz: 516559aa6be191a7e18b767b18310a55ef422ee4
4
+ data.tar.gz: ffa0b4e5234478eac73ed61ef62d7c8739a912e0
5
5
  SHA512:
6
- metadata.gz: df63c0e61d61b000418b4a27459be10d9ea03e414d8146c6010d1b5117b72159ac483ed370a0e139c962964bbf82a8f8f5eb7ada39fa91ee07ec373dfd284603
7
- data.tar.gz: c52e9bc1f9bbf102fa7be647fbd879513d056a79be64ffba303c765ae78457500b5d91457b47d9b626d7c3ce38868804941b56e656309e568a8847f8181570e1
6
+ metadata.gz: 85ae4c9da24062ee44b1722f8e873ff707cd1d857870c3442cd764141587bbec3bb6a8103ce39e98267fe4cb2e1cb5437a0ad1e578b288fe06694559b12c21c8
7
+ data.tar.gz: e622a59511f79253da99ede1dfd62b86a986e5d26b72a50d3685c06e9ed4cdb6bf2db4ef8ddf7168a31131a30216a76f83060bacd879c5da91baa730e5acb1d3
@@ -16,7 +16,7 @@ def release_projects = [project(":embulk-core"), project(":embulk-standards")]
16
16
 
17
17
  allprojects {
18
18
  group = 'org.embulk'
19
- version = '0.8.11'
19
+ version = '0.8.12'
20
20
 
21
21
  ext {
22
22
  jrubyVersion = '9.1.2.0'
@@ -256,6 +256,18 @@ List of types:
256
256
  | string | Strings |
257
257
  +-------------+----------------------------------------------+
258
258
 
259
+ The ``null_string`` option converts certain values to NULL. Values will be converted as following:
260
+
261
+ +---------------------------------+-------------------------+--------------------------+----------------+--------------------+
262
+ | | non-quoted empty string | quoted empty string ("") | non-quoted \\N | quoted \\N ("\\N") |
263
+ +=================================+=========================+==========================+================+====================+
264
+ | ``null_string: ""`` | NULL | NULL | ``\N`` | ``\N`` |
265
+ +---------------------------------+-------------------------+--------------------------+----------------+--------------------+
266
+ | ``null_string: \N`` | (empty string) | (empty string) | NULL | NULL |
267
+ +---------------------------------+-------------------------+--------------------------+----------------+--------------------+
268
+ | ``null_string: null`` (default) | NULL | (empty string) | ``\N`` | ``\N`` |
269
+ +---------------------------------+-------------------------+--------------------------+----------------+--------------------+
270
+
259
271
  You can use ``guess`` to automatically generate the column settings. See also `Quick Start <https://github.com/embulk/embulk#quick-start>`_.
260
272
 
261
273
  Example
@@ -47,7 +47,7 @@ Type description example
47
47
  **ruby-output** Ruby record output plugin ``mysql``
48
48
  **ruby-filter** Ruby record filter plugin ``add-hostname``
49
49
  **ruby-parser** Ruby file parser plugin ``csv``
50
- **ruby-formatter** Ruby file formatter plugin ``csv```
50
+ **ruby-formatter** Ruby file formatter plugin ``csv``
51
51
  ==================== =============================== =================
52
52
 
53
53
  For example, if you want to parse a new file format using Java, type this command:
@@ -4,6 +4,7 @@ Release Notes
4
4
  .. toctree::
5
5
  :maxdepth: 1
6
6
 
7
+ release/release-0.8.12
7
8
  release/release-0.8.11
8
9
  release/release-0.8.10
9
10
  release/release-0.8.9
@@ -0,0 +1,12 @@
1
+ Release 0.8.12
2
+ ==================================
3
+
4
+ General Changes
5
+ ------------------
6
+
7
+ * Improved guessing so that type of a column to long if the column includes integers and timestmap-looking integers. It was guessed as string before.
8
+
9
+
10
+ Release Date
11
+ ------------------
12
+ 2016-08-03
@@ -111,6 +111,7 @@ module Embulk::Guess
111
111
  TYPE_COALESCE = Hash[{
112
112
  long: :double,
113
113
  boolean: :long,
114
+ timestamp: :long, # TimeFormatGuess matches with digits without delimiters
114
115
  }.map {|k,v|
115
116
  [[k.to_s, v.to_s].sort, v.to_s]
116
117
  }]
@@ -1,3 +1,3 @@
1
1
  module Embulk
2
- VERSION = '0.8.11'
2
+ VERSION = '0.8.12'
3
3
  end
@@ -4,8 +4,26 @@ require 'embulk/guess/schema_guess'
4
4
 
5
5
  class SchemaGuessTest < ::Test::Unit::TestCase
6
6
  G = Embulk::Guess::SchemaGuess
7
+ C = Embulk::Column
7
8
 
8
9
  def test_guess
9
10
  G.from_hash_records([{"int" => "1", "str" => "a"}])
10
11
  end
12
+
13
+ def test_coalesce
14
+ assert_equal(
15
+ [C.new(0, "a", :timestamp, "%Y%m%d")],
16
+ G.from_hash_records([
17
+ {"a" => "20160101"},
18
+ {"a" => "20160101"},
19
+ ]))
20
+
21
+ assert_equal(
22
+ [C.new(0, "a", :long)],
23
+ G.from_hash_records([
24
+ {"a" => "20160101"},
25
+ {"a" => "20160101"},
26
+ {"a" => "12345678"},
27
+ ]))
28
+ end
11
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.11
4
+ version: 0.8.12
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-07-26 00:00:00.000000000 Z
11
+ date: 2016-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jruby-jars
@@ -108,9 +108,9 @@ files:
108
108
  - classpath/commons-beanutils-core-1.8.3.jar
109
109
  - classpath/commons-compress-1.10.jar
110
110
  - classpath/commons-lang3-3.1.jar
111
- - classpath/embulk-cli-0.8.11.jar
112
- - classpath/embulk-core-0.8.11.jar
113
- - classpath/embulk-standards-0.8.11.jar
111
+ - classpath/embulk-cli-0.8.12.jar
112
+ - classpath/embulk-core-0.8.12.jar
113
+ - classpath/embulk-standards-0.8.12.jar
114
114
  - classpath/guava-18.0.jar
115
115
  - classpath/guice-4.0.jar
116
116
  - classpath/guice-bootstrap-0.1.1.jar
@@ -425,6 +425,7 @@ files:
425
425
  - embulk-docs/src/release/release-0.8.1.rst
426
426
  - embulk-docs/src/release/release-0.8.10.rst
427
427
  - embulk-docs/src/release/release-0.8.11.rst
428
+ - embulk-docs/src/release/release-0.8.12.rst
428
429
  - embulk-docs/src/release/release-0.8.2.rst
429
430
  - embulk-docs/src/release/release-0.8.3.rst
430
431
  - embulk-docs/src/release/release-0.8.4.rst