bigquery_migration 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 39b9c02298bffbb35066e446e67e3291ce2d0f50
4
- data.tar.gz: 7f9a0aa8548ffea2163c41649dd3f2ced5b39a25
3
+ metadata.gz: 85f03f29febe10514da940bbd913562c67746211
4
+ data.tar.gz: c2d37cfceb775b429f5c5eac8bfe4ccac4db7785
5
5
  SHA512:
6
- metadata.gz: df231fbe10e2ce45e40231cfff1350a89a5acf06ed4c6014455814e8ef1962033f2c481ed8486fb13ccd720d83242453a5e9e4c2b655988fdfbf1df371217ad3
7
- data.tar.gz: ee929e10b5fbd16f3998d3132c7c830d7c4f76c7a10332b29e12fe4861e806457f9bba88507dc2a5d1515708e1ac44572ed5ced5e5e1a5a233c8fecadbff1c74
6
+ metadata.gz: b21c0a5be60c12a92df59eedcaa874ba054e9ea7bd6391ec90267a1c47f0f7d8520b4db124be9a9254ca18b034fc15507fc2168090ba6dbbb78407ee5f644442
7
+ data.tar.gz: 8b26abdeff14898c3d815ec8b37f976c7eb4dfdff51f5c1ad57ac4bc9cdd9cc5ddd36fded4c348be6cddf5a70760b2110323f44cbd5e2892eb940b85d0352665
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.1.2 (2016/04/14)
2
+
3
+ Changes:
4
+
5
+ * Genearate job_id on client side as [google recommends](https://cloud.google.com/bigquery/docs/managing_jobs_datasets_projects#managingjobs)
6
+
1
7
  # 0.1.1 (2016/04/12)
2
8
 
3
9
  Changes:
@@ -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,
@@ -1,3 +1,3 @@
1
1
  class BigqueryMigration
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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-12 00:00:00.000000000 Z
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