embulk-parser-jsonl 0.2.0 → 0.2.1

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: e169a403e6e9d48e00b0a5d4b5aed92774e556a1
4
- data.tar.gz: 0b762ec444862c9fc3f575d1b7ddd87207632d08
3
+ metadata.gz: da67073ecb764c72756208a6644294b11f5896a1
4
+ data.tar.gz: 132ecfc149acfa4b920b1e1d9afc25b0198baea4
5
5
  SHA512:
6
- metadata.gz: 6a16d1e617e0bcf7ccd1231704374f3ba30c49012c21b7b9b03744b245120e1fe174a2c42d9cc8b481836485c0c9cafa54a8fecfab9417c063fac161b6f650da
7
- data.tar.gz: 44cdc4bb41d368162b6b58a537c3c1eecf2f0b3685dd87643ecd394e2666cbd58aa55c0db09f82be9c61449b17b47ea5d164284f92e4cc2b3890e1d7b7f852bb
6
+ metadata.gz: c44b5c2a72d6977cb74f69cea454d1add830fa2acda19b8701372327dfd36358cfc1e699a175d296d18074af92169236ba4437a0f92cf32fd6156438055d886d
7
+ data.tar.gz: 560949aa482095cef947b445beffb01871ce24b4a153425c3762d543f0aaffef240606cb106955cf8d5c24a6161d03538bf4565179b35753e45214b35aad605d
@@ -1,3 +1,7 @@
1
+ ## 0.2.1 - 2019-12-03
2
+
3
+ [maintenance] Make the fixed value 3 of threshold for guess configurable [#13](https://github.com/shun0102/embulk-parser-jsonl/pull/13)
4
+
1
5
  ## 0.2.0 - 2016-05-28
2
6
 
3
7
  [new feature] Support typecast option [#9](https://github.com/shun0102/embulk-parser-jsonl/pull/9)
data/README.md CHANGED
@@ -17,6 +17,7 @@
17
17
  * **newline**: Newline character (CRLF, LF or CR) (string, default: CRLF)
18
18
  * **charset**: Character encoding (eg. ISO-8859-1, UTF-8) (string, default: UTF-8)
19
19
  * **default_typecast**: Specify whether to cast values automatically to the specified types or not (boolean, default: true)
20
+ * **min_rows_for_guess**: Minimum rows for guess (integer, default: 4)
20
21
 
21
22
  ### columns
22
23
 
@@ -31,7 +32,7 @@
31
32
  (If guess supported) you don't have to write `parser:` section in the configuration file. After writing `in:` section, you can let embulk guess `parser:` section using this command:
32
33
 
33
34
  ```
34
- $ embulk install embulk-parser-jsonl
35
+ $ embulk gem install embulk-parser-jsonl
35
36
  $ embulk guess -g jsonl config.yml -o guessed.yml
36
37
  ```
37
38
 
@@ -13,7 +13,7 @@ configurations {
13
13
  provided
14
14
  }
15
15
 
16
- version = "0.2.0"
16
+ version = "0.2.1"
17
17
 
18
18
  compileJava.options.encoding = 'UTF-8' // source encoding
19
19
  sourceCompatibility = 1.7
@@ -1,7 +1,7 @@
1
1
 
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "embulk-parser-jsonl"
4
- spec.version = "0.2.0"
4
+ spec.version = "0.2.1"
5
5
  spec.authors = ["Shunsuke Mikami"]
6
6
  spec.summary = "Jsonl parser plugin for Embulk"
7
7
  spec.description = "Parses Jsonl files read by other file input plugins."
@@ -18,7 +18,8 @@ module Embulk
18
18
  rows << JSON.parse(line)
19
19
  end
20
20
 
21
- return {} if rows.size <= 3
21
+ min_rows_for_guess = config.fetch("parser", {}).fetch("min_rows_for_guess", 4)
22
+ return {} if rows.size < min_rows_for_guess
22
23
 
23
24
  columns = Embulk::Guess::SchemaGuess.from_hash_records(rows).map do |c|
24
25
  column = {name: c.name, type: c.type}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-parser-jsonl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shunsuke Mikami
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-29 00:00:00.000000000 Z
11
+ date: 2019-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +84,7 @@ files:
84
84
  - src/test/java/org/embulk/parser/jsonl/cast/TestLongCast.java
85
85
  - src/test/java/org/embulk/parser/jsonl/cast/TestStringCast.java
86
86
  - src/test/resources/org/embulk/parser/jsonl/use_column_options.yml
87
- - classpath/embulk-parser-jsonl-0.2.0.jar
87
+ - classpath/embulk-parser-jsonl-0.2.1.jar
88
88
  homepage: https://github.com/shun0102/embulk-parser-jsonl
89
89
  licenses:
90
90
  - MIT