embulk-output-bigobject 0.2.2 → 0.2.3

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: f4abbf3b6161fb6ddb59c2cfe4fd3ae89b3a5961
4
- data.tar.gz: b02bd14ef11fdce22ee580ea76c445ea6d269d8a
3
+ metadata.gz: af597b0c7c4f99f4382a8b0e5c573dbaebd82d87
4
+ data.tar.gz: 47aef4b338f3f9ffaa081ed8d71f909e1b16e10b
5
5
  SHA512:
6
- metadata.gz: 0fa09ecceae34bdd5bca9677471f46b11d9ee8000c036e6dc9a323089ec36ec10017ae8d8b5dc6ee503e36ad6b91da577a795fc6f1ab5fe5734caf768ff96a70
7
- data.tar.gz: 0dc99721e8c4fa3b058472ec3a33bc6f552897adfb0fa8eb47def38d37d28fec90f3e62ef133dddbd6e5828973ee47f224f4ee4442990b0e550a07c38b65143b
6
+ metadata.gz: ebfb60eecf467b032f3adf08f8f4f85809be7899b5862817e758ef1cd99c6473df4d3299d9c9700a765cb2243c38f406f95e56b845231715d58f472d6ca5f29c
7
+ data.tar.gz: 7cb964fb2baa2c3ef0221beff2ca634e5f7107fbbeb3b187dd828c6eea5fad51cc3203a27bc4de4d574501fb0171616df4f55f5793bd080c3255694ebb82a344
@@ -1,7 +1,7 @@
1
1
 
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "embulk-output-bigobject"
4
- spec.version = "0.2.2"
4
+ spec.version = "0.2.3"
5
5
  spec.authors = ["randyviola"]
6
6
  spec.summary = "Bigobject output plugin for Embulk"
7
7
  spec.description = "Dumps records to Bigobject."
@@ -64,7 +64,7 @@ module Embulk
64
64
 
65
65
  page.each do |records|
66
66
  values = []
67
- records.each do |row| values << row.to_json end
67
+ records.each do |row| values << "#{row}".to_json end
68
68
  data.push("(#{values.join(",")})")
69
69
  end
70
70
  @counter += data.length
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.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
@@ -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
-