bigquery 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/big_query/client/jobs.rb +11 -0
- data/lib/big_query/version.rb +1 -1
- data/test/bigquery.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6982c1cc6c0aa808ef9f46d125de87294bd2e30e
|
4
|
+
data.tar.gz: 8a466b535aa30ebc3314cdb01a2f6e09876cd659
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d97e7043f9f7ad3719398e555702a3ca6551baa25f2dbe1389bbec26c5934b1af188f0a7e505ff6f23eb9fc02fc7f52caf8ed5b5fcb26b75f51feaa56d198a70
|
7
|
+
data.tar.gz: f17749dd5a100d85c7c9adb0aff5780e4bd6d098b0ac73bb5e0c684649fa0e812b6422d3d28789ad516e4dcc557ad3e53c9ccd2a70be715e73b25f499bd21d84
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# https://cloud.google.com/bigquery/docs/reference/v2/jobs
|
2
|
+
|
1
3
|
module BigQuery
|
2
4
|
class Client
|
3
5
|
module Jobs
|
@@ -33,6 +35,15 @@ module BigQuery
|
|
33
35
|
api(api_method: @bq.jobs.get_query_results,
|
34
36
|
parameters: opts)
|
35
37
|
end
|
38
|
+
|
39
|
+
# Insert a job
|
40
|
+
#
|
41
|
+
# @param options [Hash] hash of job options
|
42
|
+
# @return [Hash] json api response
|
43
|
+
def insert_job(opts)
|
44
|
+
api(api_method: @bq.jobs.insert,
|
45
|
+
body_object: {configuration: opts})
|
46
|
+
end
|
36
47
|
end
|
37
48
|
end
|
38
49
|
end
|
data/lib/big_query/version.rb
CHANGED
data/test/bigquery.rb
CHANGED
@@ -99,4 +99,10 @@ class BigQueryTest < MiniTest::Unit::TestCase
|
|
99
99
|
|
100
100
|
assert_equal result['kind'], "bigquery#tableDataInsertAllResponse"
|
101
101
|
end
|
102
|
+
|
103
|
+
def test_for_insert_job
|
104
|
+
res = @bq.insert_job(query: {query: "SELECT * FROM [#{config['dataset']}.test] LIMIT 1"})
|
105
|
+
|
106
|
+
assert_equal result['kind'], "bigquery#job"
|
107
|
+
end
|
102
108
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigquery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Bronte
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-11-
|
12
|
+
date: 2014-11-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: retriable
|