This is a Singer.io compliant (not yet) tap to stream data from Google Sheets to a Singer target.
Create a file called config.json
in your working directory,
following config.sample.json.
(originally found in the Google API docs)
-
Create a project here
-
Add the Google Sheets and Google Drive services from the library to the project
-
In the credentials section, add OAUTH credentials, and select "web application" as the application type.
-
Download the client id and secret and add them to the config.json file.
-
Navigate to the Google Oauth 2.0 playground
-
In the gear dropdown, choose "offline", and tick off the Use your own credentials
-
Select the Drive Readonly API, and make sure that the Sheets API is selected also. Then click Authorize APIs
-
Once you've logged in with a google account, click the Exhange authorization code for tokens button. Take the refresh token and place it into your config.json file.
- Run
python3 setup.py develop
, this will install the tap - Run
tap-sheets --discover --config config.json > properties.json
, this will show the names and ids of your spreadsheets available. Use some of these to populate the properties.json file - Run
tap-sheets --config config.json --properties properties.json
, this will run the tap and give the current, non-singer compliant output.