embulk-output-bigquery 0.4.7 → 0.4.8
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/embulk-output-bigquery.gemspec +1 -1
- data/lib/embulk/output/bigquery.rb +0 -11
- data/lib/embulk/output/bigquery/gcs_client.rb +8 -2
- data/test/test_configure.rb +0 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a24d41ba699a9ef9467658a3c9992a3c14c32495
|
4
|
+
data.tar.gz: 8ab8e872b21f05076cbc2b8c3e93e8bb64da3843
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 046bca8f4fc0f913810bf783dc7747142985d0d7482d51fa158e9254de7087ffa8d5aebf3350f981b8c1fa2231bc6f72a5dcc8063d5cf57963344d4bf72fb4e9
|
7
|
+
data.tar.gz: 5c5f56560d4873379dd5979bb211cad8907635d75bbd409540ea1170f02503ab459fd1458cd3b6ef1ef4320cc57a6ff255440bb9e660656f9f304e2be2397a58
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -128,7 +128,7 @@ out:
|
|
128
128
|
|
129
129
|
The geographic location of the dataset. Required except for US and EU.
|
130
130
|
|
131
|
-
|
131
|
+
GCS bucket should be in same region when you use `gcs_bucket`.
|
132
132
|
|
133
133
|
See also [Dataset Locations | BigQuery | Google Cloud](https://cloud.google.com/bigquery/docs/dataset-locations)
|
134
134
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "embulk-output-bigquery"
|
3
|
-
spec.version = "0.4.
|
3
|
+
spec.version = "0.4.8"
|
4
4
|
spec.authors = ["Satoshi Akama", "Naotoshi Seo"]
|
5
5
|
spec.summary = "Google BigQuery output plugin for Embulk"
|
6
6
|
spec.description = "Embulk plugin that insert records to Google BigQuery."
|
@@ -113,17 +113,6 @@ module Embulk
|
|
113
113
|
task['table_old'] ||= task['table']
|
114
114
|
end
|
115
115
|
|
116
|
-
unless task['location'].nil?
|
117
|
-
task['location'] = task['location'].downcase
|
118
|
-
# google-api-client doesn't support create bucket with region
|
119
|
-
# We need to use Cloud Storage Client Libraries to support it
|
120
|
-
if task['auto_create_gcs_bucket']
|
121
|
-
unless %w[us eu].include?(task['location'])
|
122
|
-
raise ConfigError.new "`auto_create_gcs_bucket` isn't supported excepts in us/eu"
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
116
|
if task['table_old']
|
128
117
|
task['table_old'] = now.strftime(task['table_old'])
|
129
118
|
end
|
@@ -17,15 +17,21 @@ module Embulk
|
|
17
17
|
|
18
18
|
@project = @task['project']
|
19
19
|
@bucket = @task['gcs_bucket']
|
20
|
+
@location = @task['location']
|
20
21
|
end
|
21
22
|
|
22
23
|
def insert_bucket(bucket = nil)
|
23
24
|
bucket ||= @bucket
|
24
25
|
begin
|
25
26
|
Embulk.logger.info { "embulk-output-bigquery: Insert bucket... #{@project}:#{bucket}" }
|
26
|
-
body
|
27
|
-
name: bucket
|
27
|
+
body = {
|
28
|
+
name: bucket
|
28
29
|
}
|
30
|
+
|
31
|
+
if @location
|
32
|
+
body[:location] = @location
|
33
|
+
end
|
34
|
+
|
29
35
|
opts = {}
|
30
36
|
|
31
37
|
Embulk.logger.debug { "embulk-output-bigquery: insert_bucket(#{@project}, #{body}, #{opts})" }
|
data/test/test_configure.rb
CHANGED
@@ -113,9 +113,6 @@ module Embulk
|
|
113
113
|
|
114
114
|
config = least_config.merge('location' => 'asia-northeast1')
|
115
115
|
assert_nothing_raised { Bigquery.configure(config, schema, processor_count) }
|
116
|
-
|
117
|
-
config = least_config.merge('location' => 'asia-northeast1', 'auto_create_gcs_bucket' => true)
|
118
|
-
assert_raise { Bigquery.configure(config, schema, processor_count) }
|
119
116
|
end
|
120
117
|
|
121
118
|
def test_dataset_table_old
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-bigquery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Satoshi Akama
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-05-
|
12
|
+
date: 2018-05-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|