embulk-output-bigquery 0.3.0.pre1 → 0.3.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +2 -2
- data/embulk-output-bigquery.gemspec +1 -1
- data/example/config_client_options.yml +1 -1
- data/example/config_csv.yml +1 -1
- data/example/config_delete_in_advance.yml +1 -1
- data/example/config_expose_errors.yml +1 -1
- data/example/config_guess_from_embulk_schema.yml +1 -1
- data/example/config_guess_with_column_options.yml +1 -1
- data/example/config_gzip.yml +1 -1
- data/example/config_jsonl.yml +1 -1
- data/example/config_mode_append.yml +1 -1
- data/example/config_mode_append_direct.yml +1 -1
- data/example/config_payload_column.yml +1 -1
- data/example/config_payload_column_index.yml +1 -1
- data/example/config_prevent_duplicate_insert.yml +1 -1
- data/example/config_replace.yml +1 -1
- data/example/config_replace_backup.yml +1 -1
- data/example/config_skip_file_generation.yml +1 -1
- data/example/config_table_strftime.yml +1 -1
- data/example/config_template_table.yml +1 -1
- data/example/config_uncompressed.yml +1 -1
- data/example/config_with_rehearsal.yml +1 -1
- data/example/example.yml +1 -1
- data/lib/embulk/output/bigquery.rb +5 -5
- 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: 6d94d238ce16c412168d14a2d598c4858c2517a1
|
4
|
+
data.tar.gz: 98c6a413ce767acc0db2a1b4b6fa8f1f43f1d7db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5aee1620e2171c7ca84101c196bb85015bd53d1a5816949353e3e921559dcc96211a81c1c9d6a35a563de2c4656ed98c8b495577ba57d1a8e74e046bb9ab594
|
7
|
+
data.tar.gz: 50f32129feea6bb33c7574e0d7aa73e387e37ced9ebe5d96a550225de78bddb365ab603b490a0a8361b008f16332a1092e84c278cf25e21a168700b8a751023a
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -337,7 +337,7 @@ out:
|
|
337
337
|
|
338
338
|
### Run example:
|
339
339
|
|
340
|
-
Prepare a json\_keyfile at /
|
340
|
+
Prepare a json\_keyfile at example/your-project-000.json, then
|
341
341
|
|
342
342
|
```
|
343
343
|
$ embulk bundle install --path vendor/bundle
|
@@ -351,7 +351,7 @@ $ bundle exec rake test
|
|
351
351
|
```
|
352
352
|
|
353
353
|
To run tests which actually connects to BigQuery such as test/test\_bigquery\_client.rb,
|
354
|
-
prepare a json\_keyfile at /
|
354
|
+
prepare a json\_keyfile at example/your-project-000.json, then
|
355
355
|
|
356
356
|
```
|
357
357
|
$ CONNECT=1 bundle exec ruby test/test_bigquery_client.rb
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "embulk-output-bigquery"
|
3
|
-
spec.version = "0.3.0.
|
3
|
+
spec.version = "0.3.0.pre2"
|
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."
|
data/example/config_csv.yml
CHANGED
@@ -20,7 +20,7 @@ out:
|
|
20
20
|
type: bigquery
|
21
21
|
mode: delete_in_advance
|
22
22
|
auth_method: json_key
|
23
|
-
json_keyfile: /
|
23
|
+
json_keyfile: example/your-project-000.json
|
24
24
|
dataset: your_dataset_name
|
25
25
|
table: your_table_name
|
26
26
|
source_format: NEWLINE_DELIMITED_JSON
|
data/example/config_gzip.yml
CHANGED
data/example/config_jsonl.yml
CHANGED
data/example/config_replace.yml
CHANGED
data/example/example.yml
CHANGED
@@ -26,7 +26,7 @@ module Embulk
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
def self.configure(config, schema,
|
29
|
+
def self.configure(config, schema, task_count)
|
30
30
|
task = {
|
31
31
|
'mode' => config.param('mode', :string, :default => 'append'),
|
32
32
|
'auth_method' => config.param('auth_method', :string, :default => 'private_key'),
|
@@ -193,11 +193,11 @@ module Embulk
|
|
193
193
|
unique_name = "%08x%08x%08x" % [Process.pid, now.tv_sec, now.tv_nsec]
|
194
194
|
|
195
195
|
if %w[replace replace_backup append].include?(task['mode'])
|
196
|
-
task['temp_table'] ||= "#{task['table']}
|
196
|
+
task['temp_table'] ||= "LOAD_TEMP_#{unique_name}_#{task['table']}"
|
197
197
|
end
|
198
198
|
|
199
199
|
if task['with_rehearsal']
|
200
|
-
task['rehearsal_table'] ||= "#{task['table']}
|
200
|
+
task['rehearsal_table'] ||= "LOAD_REHEARSAL_#{unique_name}_#{task['table']}"
|
201
201
|
end
|
202
202
|
|
203
203
|
task
|
@@ -230,8 +230,8 @@ module Embulk
|
|
230
230
|
transaction_report
|
231
231
|
end
|
232
232
|
|
233
|
-
def self.transaction(config, schema,
|
234
|
-
task = self.configure(config, schema,
|
233
|
+
def self.transaction(config, schema, task_count, &control)
|
234
|
+
task = self.configure(config, schema, task_count)
|
235
235
|
|
236
236
|
@task = task
|
237
237
|
@schema = schema
|
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.3.0.
|
4
|
+
version: 0.3.0.pre2
|
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: 2016-03-
|
12
|
+
date: 2016-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-api-client
|