sequel-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1df3065759c1f700359a326b1e039e2e31c7d67785c5fe5c36d11d9933bc03a
4
- data.tar.gz: 73c44cf0e5a3afea392ca675f7645a788698de6b357f9ec1023f72b5da803891
3
+ metadata.gz: 3e8459abb689482e387bc4b0cd7dac2c582a40a9c449d5cd5bad5c8da57fffdb
4
+ data.tar.gz: 4409fa1b5704c03afcd068915311c4944bdaec1326a21ba6df3ed47d9ea118a2
5
5
  SHA512:
6
- metadata.gz: 5fe03d5ba85f4b7daf490f5f1f6038f8d2101c78afcc20911a2b909c2bb73c683d8a094c3cf9229871dc6f2862b746cfd14797fe8d5091904955450600a25383
7
- data.tar.gz: bb26c418a72d251ab8d68d458ff51a108f053d83cbf326e962aa8cce446e0d5726b4da8d3d1ba7c50978d6e7de4ef362003eeea74fa414a4c5fbb6e2cf39a370
6
+ metadata.gz: 8573f4d5d1f46d63fd062d97efa1bf19ffc7d2e9a3dd24433cdd079554380f7639e2d767657285a9cc1eea829a300c08aa40cfd3a7e24eb9f0f229c0f13e0e8c
7
+ data.tar.gz: 51371f99aba0a7799a0c8c34f9d3541c86c76113d4acda78badb420375abded01cdd456f184753793505be70f92eba1d9f0a99f35abdd1f766806023f3860979
data/README.md CHANGED
@@ -40,6 +40,7 @@ Features:
40
40
  + Date
41
41
  + Float
42
42
  + BigDecimal
43
+ - Selecting the BigQuery server location
43
44
 
44
45
  ## Installation
45
46
 
@@ -72,6 +73,7 @@ db = Sequel.connect(
72
73
  adapter: :bigquery,
73
74
  project: 'your-gcp-project',
74
75
  database: 'your_bigquery_dataset_name',
76
+ location: 'australia-southeast2',
75
77
  logger: Logger.new(STDOUT),
76
78
  )
77
79
  ```
@@ -29,12 +29,13 @@ module Sequel
29
29
  config = @orig_opts.dup
30
30
  config.delete(:adapter)
31
31
  config.delete(:logger)
32
+ location = config.delete(:location)
32
33
  bq_dataset_name = config.delete(:dataset) || config.delete(:database)
33
34
  @bigquery = Google::Cloud::Bigquery.new(config)
34
35
  # ObjectSpace.each_object(HTTPClient).each { |c| c.debug_dev = STDOUT }
35
36
  @bigquery.dataset(bq_dataset_name) || begin
36
37
  @loggers[0].debug('BigQuery dataset %s does not exist; creating it' % bq_dataset_name)
37
- @bigquery.create_dataset(bq_dataset_name)
38
+ @bigquery.create_dataset(bq_dataset_name, location: location)
38
39
  end
39
40
  .tap { puts '#connect end' }
40
41
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sequel
4
4
  module Bigquery
5
- VERSION = '0.3.0'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-bigquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brendan Weibrecht
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-27 00:00:00.000000000 Z
11
+ date: 2021-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print