GithubHelp home page GithubHelp logo

isabella232 / target-gsheet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from singer-io/target-gsheet

0.0 0.0 0.0 24 KB

Write Singer data to Google Sheets

License: GNU Affero General Public License v3.0

Python 100.00%

target-gsheet's Introduction

target-gsheet

A Singer target that writes data to Google Sheets.

How to use it

target-gsheet works together with any other Singer Tap to move data from sources like Braintree, Freshdesk and Hubspot to Google Sheets. Google Sheets is a great, free way to review and visualize data.

Step 1: Activate the Google Sheets API

(originally found in the Google API docs)

  1. Use this wizard to create or select a project in the Google Developers Console and activate the Sheets API. Click Continue, then Go to credentials.

  2. On the Add credentials to your project page, click the Cancel button.

  3. At the top of the page, select the OAuth consent screen tab. Select an Email address, enter a Product name if not already set, and click the Save button.

  4. Select the Credentials tab, click the Create credentials button and select OAuth client ID.

  5. Select the application type Other, enter the name "Singer Sheets Target", and click the Create button.

  6. Click OK to dismiss the resulting dialog.

  7. Click the Download button to the right of the client ID.

  8. Move this file to your working directory and rename it client_secret.json.

Step 2: Configure

Create a file called config.json in your working directory, following config.sample.json. The required spreadsheet_id parameter is the value between the "/d/" and the "/edit" in the URL of your spreadsheet. For example, consider the following URL that references a Google Sheets spreadsheet:

https://docs.google.com/spreadsheets/d/1qpyC0XzvTcKT6EISywvqESX3A0MwQoFDE8p-Bll4hps/edit#gid=0

The ID of this spreadsheet is 1qpyC0XzvTcKT6EISywvqESX3A0MwQoFDE8p-Bll4hps.

Step 3: Install and Run

First, make sure Python 3 is installed on your system or follow these installation instructions for Mac or Ubuntu.

target-gsheet can be run with any Singer Tap, but we'll use tap-fixerio - which pulls currency exchange rate data from a public data set - as an example.

These commands will install tap-fixerio and target-gsheet with pip and then run them together, piping the output of tap-fixerio to target-gsheet:

› pip install target-gsheet tap-fixerio
› tap-fixerio | target-gsheet -c config.json
  INFO Replicating the latest exchange rate data from fixer.io
  INFO Tap exiting normally

If you're using a different Tap, substitute tap-fixerio in the final command above to the command used to run your Tap.

target-gsheet will attempt to open a new window or tab in your default browser. If this fails, copy the URL from the console and manually open it in your browser.

If you are not already logged into your Google account, you will be prompted to log in. If you are logged into multiple Google accounts, you will be asked to select one account to use for the authorization. Click the Accept button to allow target-gsheet to access your Google Sheet. You can close the tab after the signup flow is complete.

The data will be written to a sheet named exchange_rate in your Google Sheet.


Copyright © 2017 Stitch

target-gsheet's People

Contributors

mdelaurentis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.