embulk-parser-jsonpath-secure 0.4.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/classpath/accessors-smart-1.2.jar +0 -0
- data/classpath/asm-5.0.4.jar +0 -0
- data/classpath/embulk-parser-jsonpath-secure-0.4.1.jar +0 -0
- data/classpath/embulk-util-config-0.3.1.jar +0 -0
- data/classpath/embulk-util-file-0.1.3.jar +0 -0
- data/classpath/embulk-util-json-0.1.1.jar +0 -0
- data/classpath/embulk-util-rubytime-0.3.2.jar +0 -0
- data/classpath/embulk-util-timestamp-0.2.1.jar +0 -0
- data/classpath/jackson-annotations-2.13.4.jar +0 -0
- data/classpath/jackson-core-2.13.4.jar +0 -0
- data/classpath/jackson-databind-2.13.4.jar +0 -0
- data/classpath/jackson-datatype-jdk8-2.13.4.jar +0 -0
- data/classpath/json-path-2.4.0.jar +0 -0
- data/classpath/json-smart-2.3.jar +0 -0
- data/classpath/validation-api-1.1.0.Final.jar +0 -0
- data/lib/embulk/guess/jsonpath.rb +31 -0
- data/lib/embulk/parser/jsonpath.rb +3 -0
- metadata +91 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: aa0db6d8b60f7ca8e6390e972e13316ae8e65f130e6adead9a4024d86e38ced8
|
4
|
+
data.tar.gz: 39589e53237497036ad3a0b57e8bf73c69b8b253c7a8a693cc5fcaf625fc7765
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2333a3478675d4ec9aeff00e7d06015e322b7d78287312dd5996241ec9068ea6e08c64b9526a2443830cfb8db6797a7f8cff5c6cbb1eebcc294517aaf5582460
|
7
|
+
data.tar.gz: d6661f8b9f3f2e8bf5779bce827895f0e49dd518394664f0241ccfc4f22a5bbaddcf2f4205c60322a35d178d4e9645b15ba69d8c2a7c896117dc1955b73a391d
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'jsonpath'
|
3
|
+
module Embulk
|
4
|
+
module Guess
|
5
|
+
|
6
|
+
class Jsonpath < TextGuessPlugin
|
7
|
+
Plugin.register_guess("jsonpath", self)
|
8
|
+
|
9
|
+
def guess_text(config, sample_text)
|
10
|
+
parser_config = config.param("parser",:hash)
|
11
|
+
json_path = parser_config.param("root",:string,default: "$")
|
12
|
+
json = JsonPath.new(json_path).on(sample_text).first
|
13
|
+
if( json.kind_of?(Array) )
|
14
|
+
no_hash = json.find{ |j| !j.kind_of?(Hash) }
|
15
|
+
raise RuntimeError,"Can't exec guess. The row data must be hash." if no_hash
|
16
|
+
columns = Embulk::Guess::SchemaGuess.from_hash_records(json).map do |c|
|
17
|
+
column = {name: c.name, type: c.type}
|
18
|
+
column[:format] = c.format if c.format
|
19
|
+
column
|
20
|
+
end
|
21
|
+
parser_guessed = {"type" => "jsonpath"}
|
22
|
+
parser_guessed["columns"] = columns
|
23
|
+
return {"parser" => parser_guessed}
|
24
|
+
else
|
25
|
+
raise RuntimeError,"Can't guess specified the JSONPath: #{json_path}. The results does not return an Array."
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: embulk-parser-jsonpath-secure
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.1
|
5
|
+
platform: java
|
6
|
+
authors:
|
7
|
+
- Hiroyuki Sato
|
8
|
+
- Takuma kanari
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2022-09-21 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.5'
|
20
|
+
name: jsonpath
|
21
|
+
prerelease: false
|
22
|
+
type: :runtime
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0.5'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
name: json
|
35
|
+
prerelease: false
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '2.0'
|
42
|
+
description: Parses JSON files with JSONPath read by other file input plugins.
|
43
|
+
email:
|
44
|
+
- hiroysato@gmail.com
|
45
|
+
- chemtrails.t@gmail.com
|
46
|
+
executables: []
|
47
|
+
extensions: []
|
48
|
+
extra_rdoc_files: []
|
49
|
+
files:
|
50
|
+
- classpath/accessors-smart-1.2.jar
|
51
|
+
- classpath/asm-5.0.4.jar
|
52
|
+
- classpath/embulk-parser-jsonpath-secure-0.4.1.jar
|
53
|
+
- classpath/embulk-util-config-0.3.1.jar
|
54
|
+
- classpath/embulk-util-file-0.1.3.jar
|
55
|
+
- classpath/embulk-util-json-0.1.1.jar
|
56
|
+
- classpath/embulk-util-rubytime-0.3.2.jar
|
57
|
+
- classpath/embulk-util-timestamp-0.2.1.jar
|
58
|
+
- classpath/jackson-annotations-2.13.4.jar
|
59
|
+
- classpath/jackson-core-2.13.4.jar
|
60
|
+
- classpath/jackson-databind-2.13.4.jar
|
61
|
+
- classpath/jackson-datatype-jdk8-2.13.4.jar
|
62
|
+
- classpath/json-path-2.4.0.jar
|
63
|
+
- classpath/json-smart-2.3.jar
|
64
|
+
- classpath/validation-api-1.1.0.Final.jar
|
65
|
+
- lib/embulk/guess/jsonpath.rb
|
66
|
+
- lib/embulk/parser/jsonpath.rb
|
67
|
+
homepage: https://github.com/hiroyuki-sato/embulk-parser-jsonpath
|
68
|
+
licenses:
|
69
|
+
- MIT
|
70
|
+
metadata: {}
|
71
|
+
post_install_message:
|
72
|
+
rdoc_options: []
|
73
|
+
require_paths:
|
74
|
+
- lib
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
requirements: []
|
86
|
+
rubyforge_project:
|
87
|
+
rubygems_version: 2.7.9
|
88
|
+
signing_key:
|
89
|
+
specification_version: 4
|
90
|
+
summary: JSON parser with JSONPath plugin for Embulk
|
91
|
+
test_files: []
|