embulk-output-bigobject 0.2.2 → 0.2.3
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 +4 -4
- data/embulk-output-bigobject.gemspec +1 -1
- data/lib/embulk/output/bigobject.rb +1 -1
- metadata +1 -2
- data/lib/embulk/output/test.rb +0 -61
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af597b0c7c4f99f4382a8b0e5c573dbaebd82d87
|
4
|
+
data.tar.gz: 47aef4b338f3f9ffaa081ed8d71f909e1b16e10b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebfb60eecf467b032f3adf08f8f4f85809be7899b5862817e758ef1cd99c6473df4d3299d9c9700a765cb2243c38f406f95e56b845231715d58f472d6ca5f29c
|
7
|
+
data.tar.gz: 7cb964fb2baa2c3ef0221beff2ca634e5f7107fbbeb3b187dd828c6eea5fad51cc3203a27bc4de4d574501fb0171616df4f55f5793bd080c3255694ebb82a344
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-bigobject
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- randyviola
|
@@ -65,7 +65,6 @@ files:
|
|
65
65
|
- Rakefile
|
66
66
|
- embulk-output-bigobject.gemspec
|
67
67
|
- lib/embulk/output/bigobject.rb
|
68
|
-
- lib/embulk/output/test.rb
|
69
68
|
homepage: https://github.com/bigobject-inc/embulk-output-bigobject
|
70
69
|
licenses:
|
71
70
|
- MIT
|
data/lib/embulk/output/test.rb
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
require 'net/http'
|
2
|
-
require 'json'
|
3
|
-
require 'logger'
|
4
|
-
|
5
|
-
|
6
|
-
params = {"stmt" => "desc testcsv"}
|
7
|
-
json_headers = {"Content-Type" => "application/json",
|
8
|
-
"Accept" => "application/json"}
|
9
|
-
|
10
|
-
uri = URI.parse('http://192.168.99.100:9090/cmd')
|
11
|
-
http = Net::HTTP.new(uri.host, uri.port)
|
12
|
-
|
13
|
-
response = http.post(uri.path, params.to_json, json_headers)
|
14
|
-
|
15
|
-
@rsp = JSON.parse(response.body)
|
16
|
-
|
17
|
-
def checktbl
|
18
|
-
|
19
|
-
return @rsp["Status"] == 0 ? "YES" : "NO"
|
20
|
-
end
|
21
|
-
|
22
|
-
puts checktbl
|
23
|
-
|
24
|
-
# values = Array.new
|
25
|
-
# values2 = Array.new
|
26
|
-
# values2 << 1
|
27
|
-
# values2 << "2"
|
28
|
-
# values.push("(#{values2.join(",")})")
|
29
|
-
# values.push("id1")
|
30
|
-
# values.push(2)
|
31
|
-
# values.push("id2")
|
32
|
-
# str = "INSERT INTO #{values.join(",")}"
|
33
|
-
# log = Logger.new(STDOUT)
|
34
|
-
# puts str
|
35
|
-
|
36
|
-
# def init
|
37
|
-
# @http = Net::HTTP::Persistent.new 'embulk-plugin-bigobject'
|
38
|
-
# @http.headers['Content-Type'] = {"Content-Type" => "application/json", "Accept" => "application/json"}
|
39
|
-
# @uri = URI.parse('http://192.168.99.100:9090/cmd')
|
40
|
-
# puts "initialized"
|
41
|
-
# end
|
42
|
-
|
43
|
-
# def send
|
44
|
-
# #uri = URI.parse('http://192.168.99.100:9090/cmd')
|
45
|
-
# post = Net::HTTP::Post.new @uri.request_uri
|
46
|
-
# post.body = {"stmt" => "show tables"}.to_json
|
47
|
-
# response = @http.request @uri, post
|
48
|
-
# puts JSON.parse(response.body)
|
49
|
-
# end
|
50
|
-
|
51
|
-
# def shutdown
|
52
|
-
# @http.shutdown
|
53
|
-
# puts "shutdown"
|
54
|
-
# end
|
55
|
-
|
56
|
-
# init
|
57
|
-
# send
|
58
|
-
# shutdown
|
59
|
-
|
60
|
-
|
61
|
-
|