kura 0.6.3 → 1.0.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 +10 -0
- data/lib/kura/client.rb +34 -2
- data/lib/kura/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1debc77b4a5c71c844cad85bc06c93603a24eb4818b8b9e30458d5a242d6f05
|
4
|
+
data.tar.gz: 510c51094d84046376bf201da775397dc03a9c6e994ae86fe704413f7a14024f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10ffe28579b192cf3e48ef234c28f62cc3201153dada35245e93e6e9864380e195fda959d02c7a5268bf31a2a47e9b1b8afd11363651121c04a0676596ff5f16
|
7
|
+
data.tar.gz: b5e198bb1d4d8c11fb87ee855af973fe42faec35b3bb3dc4ffe82baacd221f80ff84e14a319cac1ee18670139c5b6e06c71f0fb76bf7326d53e99288dab13c5c
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# 1.0.0
|
2
|
+
|
3
|
+
## Breaking Changes
|
4
|
+
|
5
|
+
* The default value of `use_legacy_sql` is now turn to false.
|
6
|
+
|
7
|
+
## Enhancements
|
8
|
+
|
9
|
+
* Now load/query/extract/copy methods accept keyword rest argument and pass the options to the JobConfiguration properties.
|
10
|
+
|
1
11
|
# 0.6.3
|
2
12
|
|
3
13
|
## Changes
|
data/lib/kura/client.rb
CHANGED
@@ -199,7 +199,7 @@ module Kura
|
|
199
199
|
def insert_table(dataset_id, table_id, project_id: @default_project_id, expiration_time: nil,
|
200
200
|
friendly_name: nil, schema: nil, description: nil,
|
201
201
|
query: nil, external_data_configuration: nil,
|
202
|
-
use_legacy_sql:
|
202
|
+
use_legacy_sql: false,
|
203
203
|
time_partitioning: nil,
|
204
204
|
&blk)
|
205
205
|
if expiration_time
|
@@ -408,7 +408,7 @@ module Kura
|
|
408
408
|
priority: "INTERACTIVE",
|
409
409
|
use_query_cache: true,
|
410
410
|
user_defined_function_resources: nil,
|
411
|
-
use_legacy_sql:
|
411
|
+
use_legacy_sql: false,
|
412
412
|
maximum_billing_tier: nil,
|
413
413
|
maximum_bytes_billed: nil,
|
414
414
|
external_data_configuration: nil,
|
@@ -417,6 +417,7 @@ module Kura
|
|
417
417
|
job_id: nil,
|
418
418
|
wait: nil,
|
419
419
|
dry_run: false,
|
420
|
+
**kwrest,
|
420
421
|
&blk)
|
421
422
|
configuration = Google::Apis::BigqueryV2::JobConfiguration.new(
|
422
423
|
query: Google::Apis::BigqueryV2::JobConfigurationQuery.new(
|
@@ -457,6 +458,13 @@ module Kura
|
|
457
458
|
if external_data_configuration
|
458
459
|
configuration.query.table_definitions = external_data_configuration
|
459
460
|
end
|
461
|
+
kwrest.each do |kw, opt|
|
462
|
+
if configuration.query.respond_to?("#{kw}=")
|
463
|
+
configuration.query.__send__("#{kw}=", opt)
|
464
|
+
else
|
465
|
+
raise ArgumentError, "Unknown keyword argument for Kura::Client#query: #{kw}"
|
466
|
+
end
|
467
|
+
end
|
460
468
|
insert_job(configuration, wait: wait, job_id: job_id, project_id: job_project_id, &blk)
|
461
469
|
end
|
462
470
|
|
@@ -507,6 +515,7 @@ module Kura
|
|
507
515
|
job_id: nil,
|
508
516
|
file: nil, wait: nil,
|
509
517
|
dry_run: false,
|
518
|
+
**kwrest,
|
510
519
|
&blk)
|
511
520
|
write_disposition = mode_to_write_disposition(mode)
|
512
521
|
source_uris = [source_uris] if source_uris.is_a?(String)
|
@@ -553,6 +562,13 @@ module Kura
|
|
553
562
|
unless file
|
554
563
|
configuration.load.source_uris = source_uris
|
555
564
|
end
|
565
|
+
kwrest.each do |kw, opt|
|
566
|
+
if configuration.load.respond_to?("#{kw}=")
|
567
|
+
configuration.load.__send__("#{kw}=", opt)
|
568
|
+
else
|
569
|
+
raise ArgumentError, "Unknown keyword argument for Kura::Client#load: #{kw}"
|
570
|
+
end
|
571
|
+
end
|
556
572
|
insert_job(configuration, media: file, wait: wait, job_id: job_id, project_id: job_project_id, &blk)
|
557
573
|
end
|
558
574
|
|
@@ -566,6 +582,7 @@ module Kura
|
|
566
582
|
job_id: nil,
|
567
583
|
wait: nil,
|
568
584
|
dry_run: false,
|
585
|
+
**kwrest,
|
569
586
|
&blk)
|
570
587
|
dest_uris = [ dest_uris ] if dest_uris.is_a?(String)
|
571
588
|
configuration = Google::Apis::BigqueryV2::JobConfiguration.new(
|
@@ -588,6 +605,13 @@ module Kura
|
|
588
605
|
configuration.extract.field_delimiter = field_delimiter
|
589
606
|
configuration.extract.print_header = normalize_parameter(print_header)
|
590
607
|
end
|
608
|
+
kwrest.each do |kw, opt|
|
609
|
+
if configuration.extract.respond_to?("#{kw}=")
|
610
|
+
configuration.extract.__send__("#{kw}=", opt)
|
611
|
+
else
|
612
|
+
raise ArgumentError, "Unknown keyword argument for Kura::Client#extract: #{kw}"
|
613
|
+
end
|
614
|
+
end
|
591
615
|
insert_job(configuration, wait: wait, job_id: job_id, project_id: job_project_id, &blk)
|
592
616
|
end
|
593
617
|
|
@@ -599,6 +623,7 @@ module Kura
|
|
599
623
|
job_id: nil,
|
600
624
|
wait: nil,
|
601
625
|
dry_run: false,
|
626
|
+
**kwrest,
|
602
627
|
&blk)
|
603
628
|
write_disposition = mode_to_write_disposition(mode)
|
604
629
|
configuration = Google::Apis::BigqueryV2::JobConfiguration.new(
|
@@ -620,6 +645,13 @@ module Kura
|
|
620
645
|
configuration.dry_run = true
|
621
646
|
wait = nil
|
622
647
|
end
|
648
|
+
kwrest.each do |kw, opt|
|
649
|
+
if configuration.copy.respond_to?("#{kw}=")
|
650
|
+
configuration.copy.__send__("#{kw}=", opt)
|
651
|
+
else
|
652
|
+
raise ArgumentError, "Unknown keyword argument for Kura::Client#copy: #{kw}"
|
653
|
+
end
|
654
|
+
end
|
623
655
|
insert_job(configuration, wait: wait, job_id: job_id, project_id: job_project_id, &blk)
|
624
656
|
end
|
625
657
|
|
data/lib/kura/version.rb
CHANGED
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.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chikanaga Tomoyuki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-bigquery_v2
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
|
-
rubygems_version: 3.
|
151
|
+
rubygems_version: 3.3.7
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Interface to BigQuery API v2.
|