kura 0.6.1 → 0.6.2

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
  SHA256:
3
- metadata.gz: 431faddd3518e447e4966d6eaf19e9ede9adb9ea6d4fb9d03a8715487021689d
4
- data.tar.gz: f64c6c2fddcc66bde5cafca6b26a9f2e023f3627d9107fb69c23f3b15dbb41e7
3
+ metadata.gz: 2ea4ebb00dbb6f6c467dff7f4573d3627f433a4f02b55ba8b3d6b13c64c29508
4
+ data.tar.gz: a26d9f4a2f0eb6fc60d7b4371cdfff674161bdc8da0ef695d55c680a1069be0f
5
5
  SHA512:
6
- metadata.gz: 0bac5621aa3c792ce93b67b0238aa0e82fcef2ae72d2260d163c987b9f47a267f338b13fd34c6bb689e2c69d42419551c5fc96de3f147f1632a4e21298385231
7
- data.tar.gz: cc903378660c1a9b080210c8f339d4cf4e574b197dbfd59b135f3dd94274e152884ccf2a5545c3610c3df531c783b44ae1b13774760a512d30fd3005907635af
6
+ metadata.gz: 3a0a5aa8fc5ee6d559f1e2b47be2bdde98726ac278a023238aaaa690e922ed5876d5ba732c3814db03074234123364a77ceb86b5d7097bdf6bcd8e88292b78ca
7
+ data.tar.gz: 8503ea77b5e22e76f84eebe4391eb0e3757e11596c34ff53c2a450ca35d86995efd78b8017170f231a23de64100b000dfccf57a49738cf27bb9fd974d149f84d
data/ChangeLog.md CHANGED
@@ -1,3 +1,10 @@
1
+ # 0.6.2
2
+
3
+ ## Enhancements
4
+
5
+ * Support ruby 3.0.
6
+ * Support range partitioning and time partitioning parameter for load job configuration.
7
+
1
8
  # 0.6.1
2
9
 
3
10
  ## Enhancements
data/lib/kura/client.rb CHANGED
@@ -220,7 +220,7 @@ module Kura
220
220
  view: view,
221
221
  external_data_configuration: external_data_configuration)
222
222
  if time_partitioning
223
- table.time_partitioning = Google::Apis::BigqueryV2::TimePartitioning.new(time_partitioning)
223
+ table.time_partitioning = Google::Apis::BigqueryV2::TimePartitioning.new(**time_partitioning)
224
224
  end
225
225
  @api.insert_table(project_id, dataset_id, table, &blk)
226
226
  rescue
@@ -494,6 +494,8 @@ module Kura
494
494
  quote: '"', skip_leading_rows: 0,
495
495
  source_format: "CSV",
496
496
  autodetect: false,
497
+ range_partitioning: nil,
498
+ time_partitioning: nil,
497
499
  project_id: @default_project_id,
498
500
  job_project_id: @default_project_id,
499
501
  job_id: nil,
@@ -502,6 +504,14 @@ module Kura
502
504
  &blk)
503
505
  write_disposition = mode_to_write_disposition(mode)
504
506
  source_uris = [source_uris] if source_uris.is_a?(String)
507
+ case range_partitioning
508
+ when Hash
509
+ range_partitioning = Google::Apis::BigqueryV2::RangePartitioning.new(**range_partitioning)
510
+ end
511
+ case time_partitioning
512
+ when Hash
513
+ time_partitioning = Google::Apis::BigqueryV2::TimePartitioning.new(**time_partitioning)
514
+ end
505
515
  configuration = Google::Apis::BigqueryV2::JobConfiguration.new(
506
516
  load: Google::Apis::BigqueryV2::JobConfigurationLoad.new(
507
517
  destination_table: Google::Apis::BigqueryV2::TableReference.new(
@@ -514,6 +524,8 @@ module Kura
514
524
  max_bad_records: max_bad_records,
515
525
  ignore_unknown_values: normalize_parameter(ignore_unknown_values),
516
526
  source_format: source_format,
527
+ range_partitioning: range_partitioning,
528
+ time_partitioning: time_partitioning,
517
529
  )
518
530
  )
519
531
  if dry_run
data/lib/kura/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kura
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kura
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chikanaga Tomoyuki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-10 00:00:00.000000000 Z
11
+ date: 2021-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-bigquery_v2