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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -1
- data/build.gradle +1 -1
- data/embulk-parser-jsonl.gemspec +1 -1
- data/lib/embulk/guess/jsonl.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da67073ecb764c72756208a6644294b11f5896a1
|
4
|
+
data.tar.gz: 132ecfc149acfa4b920b1e1d9afc25b0198baea4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c44b5c2a72d6977cb74f69cea454d1add830fa2acda19b8701372327dfd36358cfc1e699a175d296d18074af92169236ba4437a0f92cf32fd6156438055d886d
|
7
|
+
data.tar.gz: 560949aa482095cef947b445beffb01871ce24b4a153425c3762d543f0aaffef240606cb106955cf8d5c24a6161d03538bf4565179b35753e45214b35aad605d
|
data/CHANGELOG.md
CHANGED
@@ -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
|
|
data/build.gradle
CHANGED
data/embulk-parser-jsonl.gemspec
CHANGED
@@ -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.
|
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."
|
data/lib/embulk/guess/jsonl.rb
CHANGED
@@ -18,7 +18,8 @@ module Embulk
|
|
18
18
|
rows << JSON.parse(line)
|
19
19
|
end
|
20
20
|
|
21
|
-
|
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.
|
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:
|
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.
|
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
|