bigquery_migration 0.1.1 → 0.1.2
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 +6 -0
- data/lib/bigquery_migration/bigquery_wrapper.rb +9 -0
- data/lib/bigquery_migration/version.rb +1 -1
- 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: 85f03f29febe10514da940bbd913562c67746211
|
|
4
|
+
data.tar.gz: c2d37cfceb775b429f5c5eac8bfe4ccac4db7785
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b21c0a5be60c12a92df59eedcaa874ba054e9ea7bd6391ec90267a1c47f0f7d8520b4db124be9a9254ca18b034fc15507fc2168090ba6dbbb78407ee5f644442
|
|
7
|
+
data.tar.gz: 8b26abdeff14898c3d815ec8b37f976c7eb4dfdff51f5c1ad57ac4bc9cdd9cc5ddd36fded4c348be6cddf5a70760b2110323f44cbd5e2892eb940b85d0352665
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,7 @@ require_relative 'time_with_zone'
|
|
|
6
6
|
require_relative 'hash_util'
|
|
7
7
|
require 'google/apis/bigquery_v2'
|
|
8
8
|
require 'google/api_client/auth/key_utils'
|
|
9
|
+
require 'securerandom'
|
|
9
10
|
|
|
10
11
|
class BigqueryMigration
|
|
11
12
|
class BigqueryWrapper
|
|
@@ -480,6 +481,10 @@ class BigqueryMigration
|
|
|
480
481
|
write_disposition ||= 'WRITE_TRUNCATE'
|
|
481
482
|
|
|
482
483
|
body = {
|
|
484
|
+
job_reference: {
|
|
485
|
+
project_id: self.project,
|
|
486
|
+
job_id: "job_#{SecureRandom.uuid}",
|
|
487
|
+
},
|
|
483
488
|
configuration: {
|
|
484
489
|
copy: {
|
|
485
490
|
create_deposition: 'CREATE_IF_NEEDED',
|
|
@@ -519,6 +524,10 @@ class BigqueryMigration
|
|
|
519
524
|
write_disposition ||= 'WRITE_TRUNCATE'
|
|
520
525
|
|
|
521
526
|
body = {
|
|
527
|
+
job_reference: {
|
|
528
|
+
project_id: self.project,
|
|
529
|
+
job_id: "job_#{SecureRandom.uuid}",
|
|
530
|
+
},
|
|
522
531
|
configuration: {
|
|
523
532
|
query: {
|
|
524
533
|
allow_large_results: true,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bigquery_migration
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Naotoshi Seo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-04-
|
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: google-api-client
|