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 +4 -4
- data/README.md +2 -0
- data/lib/sequel-bigquery.rb +2 -1
- data/lib/sequel_bigquery/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e8459abb689482e387bc4b0cd7dac2c582a40a9c449d5cd5bad5c8da57fffdb
|
4
|
+
data.tar.gz: 4409fa1b5704c03afcd068915311c4944bdaec1326a21ba6df3ed47d9ea118a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
```
|
data/lib/sequel-bigquery.rb
CHANGED
@@ -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
|
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.
|
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-
|
11
|
+
date: 2021-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|