bigquery_migration 0.2.0.pre1 → 0.2.0.pre2
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/lib/bigquery_migration/table_data.rb +4 -4
- 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: c8e9acd181e25a8e935168d4a99213c52bca11c9
|
4
|
+
data.tar.gz: a5f4f71c2a04fbc453656bff29b9b961d56b16dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4cbc58db0ca399e5edae6fc21d9fab708db9edebf0e9fadb8f3fdf7f3098d595de662fb92355bbea0bebffa1ffab0e426f89fc7708226917ede3832378572f4
|
7
|
+
data.tar.gz: 3fa2a4a0313eebca630b9648e8a8c5b747ea596ccfc57aa5e477ad5cbb935bb32c626128df8b1f71d9b7a09752ee5f18c02e7e86032eaea6c39894947321c97a
|
@@ -32,8 +32,8 @@ class BigqueryMigration
|
|
32
32
|
# This method called recursively.
|
33
33
|
# So, rows must be a hash and hash has key f:.
|
34
34
|
private def calculate_repeated_count(columns: nil, rows: nil)
|
35
|
-
logger.info { "calculate_repeated_count(columns: #{columns}, rows: #{rows})" }
|
36
|
-
return [1] if rows.nil?
|
35
|
+
# logger.info { "calculate_repeated_count(columns: #{columns}, rows: #{rows})" }
|
36
|
+
return [1] if (rows.nil? || rows.empty?)
|
37
37
|
validate_rows!(rows)
|
38
38
|
rows[:f].zip(columns).map do |row, column|
|
39
39
|
if column[:type] == 'RECORD'
|
@@ -63,9 +63,9 @@ class BigqueryMigration
|
|
63
63
|
# This method called recursively.
|
64
64
|
# So, rows must be a hash and hash has key f:.
|
65
65
|
private def generate_value(columns: nil, rows: nil, count: nil)
|
66
|
-
logger.info { "generate_value(columns: #{columns}, rows: #{rows}, count: #{count})" }
|
66
|
+
# logger.info { "generate_value(columns: #{columns}, rows: #{rows}, count: #{count})" }
|
67
67
|
value = []
|
68
|
-
return
|
68
|
+
return [nil] if (rows.nil? || rows.empty?)
|
69
69
|
validate_rows!(rows)
|
70
70
|
rows[:f].zip(columns).each do |row, column|
|
71
71
|
if column[:type] == 'RECORD'
|
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.2.0.
|
4
|
+
version: 0.2.0.pre2
|
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-10-
|
11
|
+
date: 2016-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-api-client
|