google-cloud-bigquery 1.35.1 → 1.36.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3c59034942c2cde710a16645bac56870987a7357de18e76fa628abc60074faf
4
- data.tar.gz: b146e3c8b3df4c664e4d6db5180e9fdf9d2e0ff1ee6c2e658d60605e7e055493
3
+ metadata.gz: ebd20bc9ec4776397f3530418bdfa18c09a9b154e10eaf3c411c6a3b1927065b
4
+ data.tar.gz: beab575327b893be124b4ff183f92c2c7ba1e4f4fb5c7986fe002d5cf1b873bb
5
5
  SHA512:
6
- metadata.gz: bbbbc86abb3b12976b9ec66ef8f3e634c8928c1992bb65ef34a7e6b8e68defa5ba992377bd5868f4686d8d9cd49b691c540218fc521cb4e89d5a880d9b58f2e3
7
- data.tar.gz: debe4ae33e83ef00f1fca7542f6eefde5f3420b28bf3ff5b9f12fb68c3effa475bfdd4a6bcae723b2fb1535cc2e194406d943913bf560e3a7d358b6453747b55
6
+ metadata.gz: b20b644003e2d74204d0639672c82138460c8403de3f0ebc6be9ff94ed7bef0c9ee1556c1fef8d17aa4c64260737d09b4cbd4ead5efdbca3facb2ec6c3fac872
7
+ data.tar.gz: ab3989b89ab63c5d54d176b35eac6509dd9cf3e2e88089489383ceebe96f08fb6d275d6c55605ecfcc1321b38dcee3c6deab99bc4d62c6d7c7869616b9510f39
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Release History
2
2
 
3
+ ### 1.36.0 / 2021-09-22
4
+
5
+ #### Features
6
+
7
+ * Add Job#delete
8
+
9
+ #### Bug Fixes
10
+
11
+ * Add precision and scale to Field#add_field
12
+
3
13
  ### 1.35.1 / 2021-09-14
4
14
 
5
15
  #### Documentation
@@ -392,6 +392,28 @@ module Google
392
392
  true
393
393
  end
394
394
 
395
+ ##
396
+ # Requests that a job is deleted. This call will return when the job is deleted.
397
+ #
398
+ # @return [Boolean] Returns `true` if the job was deleted.
399
+ #
400
+ # @example
401
+ # require "google/cloud/bigquery"
402
+ #
403
+ # bigquery = Google::Cloud::Bigquery.new
404
+ #
405
+ # job = bigquery.job "my_job"
406
+ #
407
+ # job.delete
408
+ #
409
+ # @!group Lifecycle
410
+ #
411
+ def delete
412
+ ensure_service!
413
+ service.delete_job job_id, location: location
414
+ true
415
+ end
416
+
395
417
  ##
396
418
  # Created a new job with the current configuration.
397
419
  #
@@ -939,7 +939,14 @@ module Google
939
939
  "Cannot add fields to a non-RECORD field (#{type})"
940
940
  end
941
941
 
942
- def add_field name, type, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
942
+ def add_field name,
943
+ type,
944
+ description: nil,
945
+ mode: :nullable,
946
+ policy_tags: nil,
947
+ max_length: nil,
948
+ precision: nil,
949
+ scale: nil
943
950
  frozen_check!
944
951
 
945
952
  new_gapi = Google::Apis::BigqueryV2::TableFieldSchema.new(
@@ -954,6 +961,8 @@ module Google
954
961
  new_gapi.policy_tags = Google::Apis::BigqueryV2::TableFieldSchema::PolicyTags.new names: policy_tags
955
962
  end
956
963
  new_gapi.max_length = max_length if max_length
964
+ new_gapi.precision = precision if precision
965
+ new_gapi.scale = scale if scale
957
966
  # Remove any existing field of this name
958
967
  @gapi.fields ||= []
959
968
  @gapi.fields.reject! { |f| f.name == new_gapi.name }
@@ -418,6 +418,14 @@ module Google
418
418
  end
419
419
  end
420
420
 
421
+ ##
422
+ # Deletes the job specified by jobId and location (required).
423
+ def delete_job job_id, location: nil
424
+ execute do
425
+ service.delete_job @project, job_id, location: location
426
+ end
427
+ end
428
+
421
429
  ##
422
430
  # Returns the query data for the job
423
431
  def job_query_results job_id, location: nil, max: nil, token: nil, start: nil, timeout: nil
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Bigquery
19
- VERSION = "1.35.1".freeze
19
+ VERSION = "1.36.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.35.1
4
+ version: 1.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-09-14 00:00:00.000000000 Z
12
+ date: 2021-09-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby