embulk-input-google_spreadsheets 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.travis.yml +12 -0
  4. data/CHANGELOG.md +67 -0
  5. data/Gemfile +3 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +94 -0
  8. data/Rakefile +13 -0
  9. data/embulk-input-google_spreadsheets.gemspec +24 -0
  10. data/example/config_authorized_user.yml +19 -0
  11. data/example/config_authorized_user.yml.liquid +25 -0
  12. data/example/config_authorized_user_emoji_worksheet.yml +19 -0
  13. data/example/config_authorized_user_empty_rows_appears_at_the_same_as_max_fetch_rows.yml +20 -0
  14. data/example/config_authorized_user_large_data.yml +19 -0
  15. data/example/config_authorized_user_no_data.yml +18 -0
  16. data/example/config_service_account.yml +19 -0
  17. data/example/config_service_account_emoji_worksheet.yml +19 -0
  18. data/example/config_service_account_empty_rows_appears_at_the_same_as_max_fetch_rows.yml +20 -0
  19. data/example/config_service_account_large_data.yml +19 -0
  20. data/example/config_service_account_no_data.yml +18 -0
  21. data/example/setup_authorized_user_credentials.rb +34 -0
  22. data/lib/embulk/input/google_spreadsheets.rb +182 -0
  23. data/lib/embulk/input/google_spreadsheets/auth.rb +63 -0
  24. data/lib/embulk/input/google_spreadsheets/error.rb +36 -0
  25. data/lib/embulk/input/google_spreadsheets/pager.rb +107 -0
  26. data/lib/embulk/input/google_spreadsheets/pager_util.rb +28 -0
  27. data/lib/embulk/input/google_spreadsheets/record_typecaster.rb +73 -0
  28. data/lib/embulk/input/google_spreadsheets/spreadsheets_client.rb +75 -0
  29. data/lib/embulk/input/google_spreadsheets/spreadsheets_url_util.rb +23 -0
  30. data/lib/embulk/input/google_spreadsheets/typecast/base.rb +62 -0
  31. data/lib/embulk/input/google_spreadsheets/typecast/loose_typecast.rb +84 -0
  32. data/lib/embulk/input/google_spreadsheets/typecast/minimal_typecast.rb +109 -0
  33. data/lib/embulk/input/google_spreadsheets/typecast/strict_typecast.rb +236 -0
  34. data/lib/embulk/input/google_spreadsheets/typecast/timestamp_format_util.rb +29 -0
  35. data/lib/embulk/input/google_spreadsheets/typecast_factory.rb +34 -0
  36. data/test/assert_embulk_nothing_raised.rb +11 -0
  37. data/test/assert_embulk_raise.rb +11 -0
  38. data/test/dummy.key +27 -0
  39. data/test/helper.rb +21 -0
  40. data/test/test_auth.rb +82 -0
  41. data/test/test_configure.rb +155 -0
  42. data/test/test_loose_typecast.rb +194 -0
  43. data/test/test_minimal_typecast.rb +616 -0
  44. data/test/test_pager_util.rb +24 -0
  45. data/test/test_run_examples.rb +125 -0
  46. data/test/test_spreadsheets_client.rb +87 -0
  47. data/test/test_spreadsheets_url_util.rb +23 -0
  48. data/test/test_strict_typecast.rb +666 -0
  49. data/test/test_typecast_factory.rb +36 -0
  50. metadata +220 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: '0298679088554e589d5fcf35d28052321996397b'
4
+ data.tar.gz: 437d4de2a144529e3a12c734bf2742c475632c4b
5
+ SHA512:
6
+ metadata.gz: f92a35388a40ac64fe15dde0eab169db9471884b4e27742ee5bb98ed94f994a528f6ad57c0d7400095953ac8864ba7907c600297b5a2d3f2df27096bbbab530e
7
+ data.tar.gz: 0c391fa5d167d32471d3881a77cc64012fe42a6aafa76f8a13250ef734a87d32d8aab24320db72b6b423ee2056deffc606ce2ad5f8aa9300fd591619b19f64ab
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ *~
2
+ /pkg/
3
+ /tmp/
4
+ /.bundle/
5
+ /Gemfile.lock
6
+ vendor/
7
+ bin/
8
+ .ruby-version
9
+ example/authorized_user_credentials.json
10
+ example/service_account_credentials.json
data/.travis.yml ADDED
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ cache: bundler
3
+ rvm:
4
+ - jruby-9.0.5.0
5
+ - jruby-head
6
+ jdk:
7
+ - openjdk7
8
+ before_install:
9
+ - gem install bundler
10
+ matrix:
11
+ allow_failures:
12
+ - rvm: jruby-head
data/CHANGELOG.md ADDED
@@ -0,0 +1,67 @@
1
+ 1.0.0 (2017-03-27)
2
+ ==================
3
+
4
+ ### Now, embulk-input-googlespreadsheet is recreated as embulk-input-google_spreadsheets, so this release has **lots of breaking changes**.
5
+
6
+ #### About Configuration
7
+ - Remove `account` option because this parameter can be set by `json_keyfile` or internal processing.
8
+ - Change acceptable values of `auth_method` option to `service_account`, `authorized_user`, `compute_engine`, and `application_default`.
9
+ - `json_key` is renamed to `service_account`.
10
+ - `refresh_token` is renamed to `authorized_user`.
11
+ - Remove `spreadsheet_key` option because it is ambiguous what to specify for this option.
12
+ - Create `spreadsheets_url` option instead of `spreadsheet_key` option.
13
+ - Create `max_fetch_rows` option for loading a worksheet which have lots of cells.
14
+ - Load data from a worksheet for each numerical value specified by this option.
15
+ - Create `null_string` option to define `NULL` value.
16
+ - Create `stop_on_invalid_record` option.
17
+ - Stop loading data if this option is true.
18
+ - Create `default_timestamp_format` option.
19
+ - Create `default_timezone` option.
20
+ - Create `typecast` option for `columns` configurations.
21
+ - You can choose `strict`, `loose`, `minimal`.
22
+ - You can set default by `default_typecast` option.
23
+
24
+ #### About Behaviours
25
+ - Improve memory usage
26
+ - The previous implementation loads all data (includes other worksheets) from the spreadsheets at once by each task, so embulk uses lots of memory.
27
+ - This version loads data from the specified worksheet for each numerical value specified by `max_fetch_rows` option.
28
+ - Change default timestamp format `%Y-%m-%d %H:%M:%S` to `%Y-%m-%d %H:%M:%S.%N %z`.
29
+ - This new default format follows embulk-core implementation.
30
+ - Ref. https://github.com/embulk/embulk/blob/936c5d5a20af3086f7d1e5779a89035105bb975b/embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java#L10
31
+ - But, `Time.strptime` does not support `%6N`, so this plugin use `%N` instead.
32
+ - Enable to define default timestamp format by using `default_timestamp_format` option.
33
+ - Change default timezone from `Asia/Tokyo` to `UTC`.
34
+ - This follows world standard.
35
+ - Enable to define default timezone by using `default_timezone` option.
36
+ - Remove mysterious replace of string.
37
+ - The previous version replace `\t` and `\n` to ` `, but the implementation is so mysterious for users.
38
+ - This version does not do any mysterious replaces.
39
+ - Change errors more traceable.
40
+ - All errors are wrapped by `Embulk::Input::GoogleSpreadsheets::ConfigError` or `Embulk::Input::GoogleSpreadsheets::DataError`, so you can see JRuby stacktrace when some error occurs.
41
+ - Improve processing invalid records.
42
+ - Enable to skip by set `stop_on_invalid_record` option false.
43
+ - Improve Typecasting.
44
+ - Enable to define `NULL` value by using `null_string` option.
45
+ - Enable to use `yes` or `no` as boolean type.
46
+ - Disable to round values.
47
+ - The previous version typecast empty string to `0` if the type is `long`.
48
+ - The previous version typecast empty string to `0.0` if the type is `double`.
49
+ - Support loose typecasting.
50
+ - Support minimal typecasting.
51
+
52
+ #### Others
53
+ - Add tests
54
+ - Rename this plugin's name to `embulk-input-google_spreadsheets`
55
+ - Start CI
56
+ - https://travis-ci.org/medjed/embulk-input-google_spreadsheets
57
+
58
+ #### Known Issues
59
+ - [Some multi-byte strings cannot be used as a worksheet title.](https://github.com/medjed/embulk-input-google_spreadsheets/issues/6)
60
+ - [Emoji cannot be used as a worksheet title.](https://github.com/medjed/embulk-input-google_spreadsheets/issues/7)
61
+
62
+ 0.3.0 (2017-03-08)
63
+ ==================
64
+
65
+ - change: transfer `apollocarlos/embulk-input-googlespreadsheet` to `medjed/embulk-input-googlespreadsheet`
66
+ - incompatible change: raise `ConfigError` if worksheet cannot be found.
67
+ - incompatible change: change `CompatibilityError` to `UnmatchedNumberOfColumnsError` .
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org/'
2
+
3
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+
2
+ MIT License
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining
5
+ a copy of this software and associated documentation files (the
6
+ "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish,
8
+ distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so, subject to
10
+ the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # Google Spreadsheets input plugin for Embulk
2
+
3
+ [![Build Status](https://secure.travis-ci.org/medjed/embulk-input-google_spreadsheets.png?branch=master)](http://travis-ci.org/medjed/embulk-input-google_spreadsheets)
4
+
5
+ Embulk input plugin to load records from Google Spreadsheets.
6
+
7
+ ## Overview
8
+
9
+ * **Plugin type**: input
10
+
11
+ ## Configuration
12
+
13
+ | name | type | requirement | default | description |
14
+ |:--------------------|:------------|:------------|:----------------|:-----------------------|
15
+ | auth_method | string | optional | `authorized_user` | `service_account`, `authorized_user`, `compute_engine`, or `application_default` |
16
+ | json_keyfile | string | optional | | keyfile path or `content` |
17
+ | spreadsheets_url | string | required | | |
18
+ | worksheet_title | string | required | | worksheet title |
19
+ | start_column | integer | optional | `1` | |
20
+ | start_row | integer | optional | `1` | |
21
+ | end_row | integer | optional | `-1` | `-1` means loading records until an empty record appears. |
22
+ | max_fetch_rows | integer | optional | `10000` | Load data from a worksheet for each numerical value specified by this option. |
23
+ | null_string | string | optional | `''` | Replace this value to `NULL` |
24
+ | stop_on_invalid_record | boolean | optional | `true` | |
25
+ | default_timestamp_format | string | optional | `'%Y-%m-%d %H:%M:%S.%N %z'` | |
26
+ | default_timezone | string | optional | `'UTC'` | |
27
+ | default_typecast | string | optional | `'strict'` | |
28
+ | columns | array | required | | |
29
+
30
+ ##### about keyfile
31
+ * if `auth_method` is `compute_engine` or `application_default`, this option is not required.
32
+ * if `auth_method` is `authorized_user`, this plugin supposes the format is the below.
33
+
34
+ ```json
35
+ {
36
+ "client_id":"xxxxxxxxxxx.apps.googleusercontent.com",
37
+ "client_secret":"xxxxxxxxxxx",
38
+ "refresh_token":"xxxxxxxxxxx"
39
+ }
40
+ ```
41
+ * if `auth_method` is `service_account`, set the service account credential json file path.
42
+
43
+ ##### about columns
44
+ * name: column name
45
+ * type: boolean, long, double, string, timestamp, json
46
+ * format: timestamp format like `'%Y-%m-%d %H:%M:%S.%N %z'`
47
+ * timezone: timezone
48
+ * typecast: you can choose `strict`, `loose`, `minimal` (default: `strict`)
49
+ * `strict`: raise TypecastError if typecasting is failed.
50
+ * `loose` : set `NULL` value if typecasting is failed.
51
+ * `minimal` : typecast minimally.
52
+
53
+
54
+ ## Development
55
+
56
+ ### Run example:
57
+
58
+ 1. Execute `example/setup_authorized_user_credentials.rb` if you don't have credentials, then
59
+ 2.
60
+
61
+ ```
62
+ $ embulk bundle install --path vendor/bundle
63
+ $ embulk run -b . -l trace example/config_authorized_user.yml
64
+ ```
65
+
66
+ ### Run test:
67
+
68
+ ```
69
+ $ bundle exec rake test
70
+ ```
71
+
72
+ To run tests which actually connects to Google Spreadsheets such as `test/test_google_spreadsheets_client.rb`,
73
+ prepare a json\_keyfile at `example/service_account_credentials.json`, then
74
+
75
+ ```
76
+ $ bundle exec ruby test/test_google_spreadsheets_client.rb
77
+ $ bundle exec ruby test/test_example.rb
78
+ ```
79
+
80
+ ### Release gem:
81
+
82
+ Fix gemspec, then
83
+
84
+ ```
85
+ $ bundle exec rake release
86
+ ```
87
+
88
+ ## ChangeLog
89
+
90
+ [CHANGELOG.md](CHANGELOG.md)
91
+
92
+ ## Known Issues
93
+
94
+ [Github Issues](https://github.com/medjed/embulk-input-google_spreadsheets/issues)
data/Rakefile ADDED
@@ -0,0 +1,13 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rake/testtask'
4
+
5
+ desc 'Run test_unit based test'
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.test_files = Dir["test/**/test_*.rb"].sort
9
+ t.verbose = true
10
+ t.warning = false
11
+ end
12
+ task :default => :test
13
+
@@ -0,0 +1,24 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = 'embulk-input-google_spreadsheets'
3
+ spec.version = '1.0.0'
4
+ spec.authors = %w(Civitaspo yang-xu)
5
+ spec.summary = 'Google Spreadsheets input plugin for Embulk'
6
+ spec.description = 'Load records from Google Spreadsheets.'
7
+ spec.email = %w(civitaspo@gmail.com xu.yang.9.65@gmail.com)
8
+ spec.licenses = ['MIT']
9
+ spec.homepage = 'https://github.com/medjed/embulk-input-google_spreadsheets'
10
+
11
+ spec.files = `git ls-files`.split("\n") + Dir['classpath/*.jar']
12
+ spec.test_files = spec.files.grep(%r{^(test|spec)/})
13
+ spec.require_paths = ['lib']
14
+
15
+ spec.add_development_dependency 'embulk', '>= 0.8.1'
16
+ spec.add_development_dependency 'bundler'
17
+ spec.add_development_dependency 'rake'
18
+ spec.add_development_dependency 'highline'
19
+ spec.add_development_dependency 'test-unit'
20
+ spec.add_development_dependency 'test-unit-rr'
21
+
22
+ spec.add_dependency 'google-api-client', '>= 0.9.15'
23
+ spec.add_dependency 'time_with_zone'
24
+ end
@@ -0,0 +1,19 @@
1
+ in:
2
+ type: google_spreadsheets
3
+ auth_method: authorized_user
4
+ json_keyfile: example/authorized_user_credentials.json
5
+ spreadsheets_url: https://docs.google.com/spreadsheets/d/1Cxz-LudQuhRAGZL8mBoHs6mRnpjODpyF4Rwc5UYoV1E/edit#gid=0
6
+ worksheet_title: sheet1
7
+ start_row: 2
8
+ default_timezone: Asia/Tokyo
9
+ null_string: '\N'
10
+ default_typecast: strict
11
+ columns:
12
+ - {name: _c1, type: boolean}
13
+ - {name: _c2, type: string}
14
+ - {name: _c3, type: long}
15
+ - {name: _c4, type: double}
16
+ - {name: _c5, type: timestamp, format: '%Y-%m-%d %H:%M:%S.%N'}
17
+ - {name: _c6, type: timestamp, format: '%Y-%m-%d'}
18
+ out:
19
+ type: stdout
@@ -0,0 +1,25 @@
1
+ in:
2
+ type: google_spreadsheets
3
+ auth_method: authorized_user
4
+ json_keyfile:
5
+ content: |
6
+ {
7
+ "client_id": "{{ env.GOOGLE_AUTH_CLIENT_ID }}",
8
+ "client_secret": "{{ env.GOOGLE_AUTH_CLIENT_SECRET }}",
9
+ "refresh_token": "{{ env.GOOGLE_AUTH_REFRESH_TOKEN }}"
10
+ }
11
+ spreadsheets_url: https://docs.google.com/spreadsheets/d/1Cxz-LudQuhRAGZL8mBoHs6mRnpjODpyF4Rwc5UYoV1E/edit#gid=0
12
+ worksheet_title: sheet1
13
+ start_column: 2
14
+ default_timezone: Asia/Tokyo
15
+ null_string: '\N'
16
+ columns:
17
+ - {name: _c1, type: boolean}
18
+ - {name: _c2, type: string}
19
+ - {name: _c3, type: long}
20
+ - {name: _c4, type: double}
21
+ - {name: _c5, type: timestamp, format: '%Y-%m-%d %H:%M:%S.%N'}
22
+ - {name: _c6, type: timestamp, format: '%Y-%m-%d'}
23
+
24
+ out:
25
+ type: stdout
@@ -0,0 +1,19 @@
1
+ in:
2
+ type: google_spreadsheets
3
+ auth_method: authorized_user
4
+ json_keyfile: example/authorized_user_credentials.json
5
+ spreadsheets_url: https://docs.google.com/spreadsheets/d/1Cxz-LudQuhRAGZL8mBoHs6mRnpjODpyF4Rwc5UYoV1E/edit#gid=0
6
+ worksheet_title: 🍣emoji🍣
7
+ start_row: 2
8
+ default_timezone: Asia/Tokyo
9
+ null_string: '\N'
10
+ default_typecast: strict
11
+ columns:
12
+ - {name: _c1, type: boolean}
13
+ - {name: _c2, type: string}
14
+ - {name: _c3, type: long}
15
+ - {name: _c4, type: double}
16
+ - {name: _c5, type: timestamp, format: '%Y-%m-%d %H:%M:%S.%N'}
17
+ - {name: _c6, type: timestamp, format: '%Y-%m-%d'}
18
+ out:
19
+ type: stdout
@@ -0,0 +1,20 @@
1
+ in:
2
+ type: google_spreadsheets
3
+ auth_method: authorized_user
4
+ json_keyfile: example/authorized_user_credentials.json
5
+ spreadsheets_url: https://docs.google.com/spreadsheets/d/1Cxz-LudQuhRAGZL8mBoHs6mRnpjODpyF4Rwc5UYoV1E/edit#gid=0
6
+ worksheet_title: Empty rows appears at the same as max_fetch_rows
7
+ start_row: 2
8
+ max_fetch_rows: 2
9
+ default_timezone: Asia/Tokyo
10
+ null_string: '\N'
11
+ default_typecast: strict
12
+ columns:
13
+ - {name: _c1, type: boolean}
14
+ - {name: _c2, type: string}
15
+ - {name: _c3, type: long}
16
+ - {name: _c4, type: double}
17
+ - {name: _c5, type: timestamp, format: '%Y-%m-%d %H:%M:%S.%N'}
18
+ - {name: _c6, type: timestamp, format: '%Y-%m-%d'}
19
+ out:
20
+ type: stdout
@@ -0,0 +1,19 @@
1
+ in:
2
+ type: google_spreadsheets
3
+ auth_method: authorized_user
4
+ json_keyfile: example/authorized_user_credentials.json
5
+ spreadsheets_url: https://docs.google.com/spreadsheets/d/1Cxz-LudQuhRAGZL8mBoHs6mRnpjODpyF4Rwc5UYoV1E/edit#gid=0
6
+ worksheet_title: Large Data
7
+ start_row: 2
8
+ default_timezone: Asia/Tokyo
9
+ null_string: '\N'
10
+ default_typecast: strict
11
+ columns:
12
+ - {name: _c1, type: boolean}
13
+ - {name: _c2, type: string}
14
+ - {name: _c3, type: long}
15
+ - {name: _c4, type: double}
16
+ - {name: _c5, type: timestamp, format: '%Y-%m-%d %H:%M:%S.%N'}
17
+ - {name: _c6, type: timestamp, format: '%Y-%m-%d'}
18
+ out:
19
+ type: stdout
@@ -0,0 +1,18 @@
1
+ in:
2
+ type: google_spreadsheets
3
+ auth_method: authorized_user
4
+ json_keyfile: example/authorized_user_credentials.json
5
+ spreadsheets_url: https://docs.google.com/spreadsheets/d/1Cxz-LudQuhRAGZL8mBoHs6mRnpjODpyF4Rwc5UYoV1E/edit#gid=0
6
+ worksheet_title: No Data
7
+ default_timezone: Asia/Tokyo
8
+ null_string: '\N'
9
+ default_typecast: strict
10
+ columns:
11
+ - {name: _c1, type: boolean}
12
+ - {name: _c2, type: string}
13
+ - {name: _c3, type: long}
14
+ - {name: _c4, type: double}
15
+ - {name: _c5, type: timestamp, format: '%Y-%m-%d %H:%M:%S.%N'}
16
+ - {name: _c6, type: timestamp, format: '%Y-%m-%d'}
17
+ out:
18
+ type: stdout
@@ -0,0 +1,19 @@
1
+ in:
2
+ type: google_spreadsheets
3
+ auth_method: service_account
4
+ json_keyfile: example/service_account_credentials.json
5
+ spreadsheets_url: https://docs.google.com/spreadsheets/d/1Cxz-LudQuhRAGZL8mBoHs6mRnpjODpyF4Rwc5UYoV1E/edit#gid=0
6
+ worksheet_title: sheet1
7
+ start_row: 2
8
+ default_timezone: Asia/Tokyo
9
+ null_string: '\N'
10
+ default_typecast: strict
11
+ columns:
12
+ - {name: _c1, type: boolean}
13
+ - {name: _c2, type: string}
14
+ - {name: _c3, type: long}
15
+ - {name: _c4, type: double}
16
+ - {name: _c5, type: timestamp, format: '%Y-%m-%d %H:%M:%S.%N'}
17
+ - {name: _c6, type: timestamp, format: '%Y-%m-%d'}
18
+ out:
19
+ type: stdout
@@ -0,0 +1,19 @@
1
+ in:
2
+ type: google_spreadsheets
3
+ auth_method: service_account
4
+ json_keyfile: example/service_account_credentials.json
5
+ spreadsheets_url: https://docs.google.com/spreadsheets/d/1Cxz-LudQuhRAGZL8mBoHs6mRnpjODpyF4Rwc5UYoV1E/edit#gid=0
6
+ worksheet_title: 🍣emoji🍣
7
+ start_row: 2
8
+ default_timezone: Asia/Tokyo
9
+ null_string: '\N'
10
+ default_typecast: strict
11
+ columns:
12
+ - {name: _c1, type: boolean}
13
+ - {name: _c2, type: string}
14
+ - {name: _c3, type: long}
15
+ - {name: _c4, type: double}
16
+ - {name: _c5, type: timestamp, format: '%Y-%m-%d %H:%M:%S.%N'}
17
+ - {name: _c6, type: timestamp, format: '%Y-%m-%d'}
18
+ out:
19
+ type: stdout
@@ -0,0 +1,20 @@
1
+ in:
2
+ type: google_spreadsheets
3
+ auth_method: service_account
4
+ json_keyfile: example/service_account_credentials.json
5
+ spreadsheets_url: https://docs.google.com/spreadsheets/d/1Cxz-LudQuhRAGZL8mBoHs6mRnpjODpyF4Rwc5UYoV1E/edit#gid=0
6
+ worksheet_title: Empty rows appears at the same as max_fetch_rows
7
+ start_row: 2
8
+ max_fetch_rows: 2
9
+ default_timezone: Asia/Tokyo
10
+ null_string: '\N'
11
+ default_typecast: strict
12
+ columns:
13
+ - {name: _c1, type: boolean}
14
+ - {name: _c2, type: string}
15
+ - {name: _c3, type: long}
16
+ - {name: _c4, type: double}
17
+ - {name: _c5, type: timestamp, format: '%Y-%m-%d %H:%M:%S.%N'}
18
+ - {name: _c6, type: timestamp, format: '%Y-%m-%d'}
19
+ out:
20
+ type: stdout