embulk-output-bigquery 0.7.0 → 0.7.1
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/.github/workflows/check.yml +2 -2
- data/CHANGELOG.md +6 -0
- data/README.md +2 -0
- data/embulk-output-bigquery.gemspec +3 -2
- data/lib/embulk/output/bigquery/bigquery_client.rb +1 -0
- data/lib/embulk/output/bigquery/helper.rb +5 -4
- data/lib/embulk/output/bigquery.rb +2 -0
- data/test/test_helper.rb +2 -2
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fba97c5f4a2935df80c4c4efb7f389c9818f221773c856b5f490f8e3e65c172
|
4
|
+
data.tar.gz: e6949d104a822c586dc65180aff030af3da963a535a9e2ca3a9ac5b93f706527
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 695c2c596d172eed178ddf34e12b985c7179cff73924d316641e77e4ee52465bb79d94d7e7c1141a7831859fe44d15cfd28b6f7aa0b409ce0d57626ac83abea9
|
7
|
+
data.tar.gz: c48f7b6ce8df9141f2c716ffec0d0786fc5aa87cad034fffeb6df5055236cb5dff651f41f17580a6041b769cfd9198be36656909b87e1c844a694faef42616fa
|
data/.github/workflows/check.yml
CHANGED
@@ -13,9 +13,9 @@ jobs:
|
|
13
13
|
- 9.4.2.0
|
14
14
|
fail-fast: false
|
15
15
|
steps:
|
16
|
-
- uses: actions/checkout@
|
16
|
+
- uses: actions/checkout@v4
|
17
17
|
- name: Set up OpenJDK 8
|
18
|
-
uses: actions/setup-java@
|
18
|
+
uses: actions/setup-java@v4
|
19
19
|
with:
|
20
20
|
java-version: 8
|
21
21
|
distribution: "temurin"
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 0.7.1 - 2024-03-4
|
2
|
+
* [enhancement] Support description of columns and tables (Thanks to @kyoshidajp and @fagai ) #142
|
3
|
+
* [maintenance] Add missing GitHub Actions environment setting. #160
|
4
|
+
* [maintenance] Replace google-api-client with specific Google APIs (Thanks to @Nozomuts) #161
|
5
|
+
* [maintenance] Update GitHub Actions use checkout@v4 and setup-java@v4 #162
|
6
|
+
|
1
7
|
## 0.7.0 - 2024-02-1
|
2
8
|
* [enhancement] Add support Embulk 0.11.x
|
3
9
|
|
data/README.md
CHANGED
@@ -60,6 +60,7 @@ OAuth flow for installed applications.
|
|
60
60
|
| gcs_bucket | string | optional | nil | See [GCS Bucket](#gcs-bucket) |
|
61
61
|
| auto_create_gcs_bucket | boolean | optional | false | See [GCS Bucket](#gcs-bucket) |
|
62
62
|
| progress_log_interval | float | optional | nil (Disabled) | Progress log interval. The progress log is disabled by nil (default). NOTE: This option may be removed in a future because a filter plugin can achieve the same goal |
|
63
|
+
| description | string | optional | nil | description of table |
|
63
64
|
|
64
65
|
Client or request options
|
65
66
|
|
@@ -329,6 +330,7 @@ Column options are used to aid guessing BigQuery schema, or to define conversion
|
|
329
330
|
- json: `STRING`, `RECORD` (default: `STRING`)
|
330
331
|
- **mode**: BigQuery mode such as `NULLABLE`, `REQUIRED`, and `REPEATED` (string, default: `NULLABLE`)
|
331
332
|
- **fields**: Describes the nested schema fields if the type property is set to RECORD. Please note that this is **required** for `RECORD` column.
|
333
|
+
- **description**: description (string, default is `None`).
|
332
334
|
- **timestamp_format**: timestamp format to convert into/from `timestamp` (string, default is `default_timestamp_format`)
|
333
335
|
- **timezone**: timezone to convert into/from `timestamp`, `date` (string, default is `default_timezone`).
|
334
336
|
- **default_timestamp_format**: default timestamp format for column_options (string, default is "%Y-%m-%d %H:%M:%S.%6N")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "embulk-output-bigquery"
|
3
|
-
spec.version = "0.7.
|
3
|
+
spec.version = "0.7.1"
|
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."
|
@@ -15,7 +15,8 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.require_paths = ["lib"]
|
16
16
|
|
17
17
|
# the latest version
|
18
|
-
spec.add_dependency 'google-
|
18
|
+
spec.add_dependency 'google-apis-storage_v1'
|
19
|
+
spec.add_dependency 'google-apis-bigquery_v2'
|
19
20
|
spec.add_dependency 'time_with_zone'
|
20
21
|
spec.add_dependency 'thwait'
|
21
22
|
# activesupport require Ruby >= 2.7.0
|
@@ -46,10 +46,11 @@ module Embulk
|
|
46
46
|
embulk_type = column[:type]
|
47
47
|
column_option = column_options_map[column_name] || {}
|
48
48
|
{}.tap do |field|
|
49
|
-
field[:name]
|
50
|
-
field[:type]
|
51
|
-
field[:mode]
|
52
|
-
field[:fields]
|
49
|
+
field[:name] = column_name
|
50
|
+
field[:type] = (column_option['type'] || bq_type_from_embulk_type(embulk_type)).upcase
|
51
|
+
field[:mode] = column_option['mode'] if column_option['mode']
|
52
|
+
field[:fields] = deep_symbolize_keys(column_option['fields']) if column_option['fields']
|
53
|
+
field[:description] = column_option['description'] if column_option['description']
|
53
54
|
end
|
54
55
|
end
|
55
56
|
end
|
@@ -63,6 +63,8 @@ module Embulk
|
|
63
63
|
'payload_column' => config.param('payload_column', :string, :default => nil),
|
64
64
|
'payload_column_index' => config.param('payload_column_index', :integer, :default => nil),
|
65
65
|
|
66
|
+
'description' => config.param('description', :string, :default => nil),
|
67
|
+
|
66
68
|
'open_timeout_sec' => config.param('open_timeout_sec', :integer, :default => nil),
|
67
69
|
'timeout_sec' => config.param('timeout_sec', :integer, :default => nil), # google-api-ruby-client < v0.11.0
|
68
70
|
'send_timeout_sec' => config.param('send_timeout_sec', :integer, :default => nil), # google-api-ruby-client >= v0.11.0
|
data/test/test_helper.rb
CHANGED
@@ -68,7 +68,7 @@ module Embulk
|
|
68
68
|
])
|
69
69
|
task = {
|
70
70
|
'column_options' => [
|
71
|
-
{'name' => 'boolean', 'type' => 'STRING', 'mode' => 'REQUIRED'},
|
71
|
+
{'name' => 'boolean', 'type' => 'STRING', 'mode' => 'REQUIRED', 'description' => 'hoge'},
|
72
72
|
{'name' => 'long', 'type' => 'STRING'},
|
73
73
|
{'name' => 'double', 'type' => 'STRING'},
|
74
74
|
{'name' => 'string', 'type' => 'INTEGER'},
|
@@ -81,7 +81,7 @@ module Embulk
|
|
81
81
|
],
|
82
82
|
}
|
83
83
|
expected = [
|
84
|
-
{name: 'boolean',
|
84
|
+
{name: 'boolean', type: 'STRING', mode: 'REQUIRED', description: 'hoge'},
|
85
85
|
{name: 'long', type: 'STRING'},
|
86
86
|
{name: 'double', type: 'STRING'},
|
87
87
|
{name: 'string', type: 'INTEGER'},
|
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.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Satoshi Akama
|
@@ -9,22 +9,36 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-03-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name: google-
|
15
|
+
name: google-apis-storage_v1
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0
|
20
|
+
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: google-apis-bigquery_v2
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
26
33
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0
|
34
|
+
version: '0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: time_with_zone
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|