Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

embulk-input-google_spreadsheets

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embulk-input-google_spreadsheets

  • 1.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

Google Spreadsheets input plugin for Embulk

Build Status

Embulk input plugin to load records from Google Spreadsheets.

Overview

  • Plugin type: input

Configuration

nametyperequirementdefaultdescription
auth_methodstringoptionalauthorized_userservice_account, authorized_user, compute_engine, or application_default
json_keyfilestringoptionalkeyfile path or content
spreadsheets_urlstringrequired
worksheet_titlestringrequiredworksheet title
start_columnintegeroptional1
start_rowintegeroptional1
end_rowintegeroptional-1-1 means loading records until an empty record appears.
max_fetch_rowsintegeroptional10000Load data from a worksheet for each numerical value specified by this option.
null_stringstringoptional''Replace this value to NULL
value_render_optionstringoptional'FORMATTED_VALUE''FORMATTED_VALUE', 'UNFORMATTED_VALUE', 'FORMULA' are available. See the value_render_option document.
stop_on_invalid_recordbooleanoptionaltrue
default_timestamp_formatstringoptional'%Y-%m-%d %H:%M:%S.%N %z'
default_timezonestringoptional'UTC'
default_typecaststringoptional'strict'
columnsarrayrequired
about keyfile
  • if auth_method is compute_engine or application_default, this option is not required.

  • if auth_method is authorized_user, this plugin supposes the format is the below.

    {
      "client_id":"xxxxxxxxxxx.apps.googleusercontent.com",
      "client_secret":"xxxxxxxxxxx",
      "refresh_token":"xxxxxxxxxxx"
    }
    
  • if auth_method is service_account, set the service account credential json file path.

about columns
  • name: column name
  • type: boolean, long, double, string, timestamp, json
  • format: timestamp format like '%Y-%m-%d %H:%M:%S.%N %z'
  • timezone: timezone
  • typecast: you can choose strict, loose, minimal (default: strict)
    • strict: raise TypecastError if typecasting is failed.
    • loose : set NULL value if typecasting is failed.
    • minimal : typecast minimally.

Prepare JSON file for auth_method: authorized_user

You may use example/setup_authorized_user_credentials.rb to prepare OAuth token.

Go to GCP console > API Manager > Credentials > Create 'OAuth Client ID'. Get the client id and client secret.

Run setup_authorized_user_credentials.rb to get refresh_token.

bundle --path vendor/bundle
bundle exec ruby example/setup_authorized_user_credentials.rb

Development

Run example:

  1. Execute example/setup_authorized_user_credentials.rb if you don't have credentials, then
$ embulk bundle install --path vendor/bundle
$ embulk run -b . -l trace example/config_authorized_user.yml

Run test:

$ bundle exec rake test

To run tests which actually connects to Google Spreadsheets such as test/test_google_spreadsheets_client.rb, prepare a json_keyfile at example/service_account_credentials.json, then

$ bundle exec ruby test/test_google_spreadsheets_client.rb
$ bundle exec ruby test/test_example.rb

Release gem:

Fix gemspec, then

$ bundle exec rake release

ChangeLog

CHANGELOG.md

Known Issues

Github Issues

FAQs

Package last updated on 16 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc