This script sets up an integeration between Googlesheet and Stitch so data can be directly imported from a spreadsheet to the warehouse.
- Check your Client ID
- Log into your Stitch account
- Check your URL, it should look like: https://app.stitchdata.com/client/103773/pipeline/connections
- The six digit number between client/ and /pipeline is your Clinet ID (103773 in the above example)
- Set up integration on Stitch
- Create a new integration
- Choose Import API
- Give it a name
- Generate API token and write it down
- Set up script in Googlesheet
- Open the sheet you want to set up the integration
- Click on the menu tools > script editor
- Delete default contents in the project
- Paste script.gs to the project
- Save the project
- Close the window
- Set up sync in the sheet
- Close and reopen the sheet
- Wait for the script run and the dropdown menu Stitch Import to appear (usually takes a few seconds)
- Click Stitch Import > Setup Spreadsheet for Push for first time use
- Enter your API token, client ID and primary key
- By default, first row is read as headers
- Click Stitch Import > Sync with Stitch to sync table
- We are done!
Original article: https://blog.stitchdata.com/google-sheets-stitch-an-easy-way-sync-your-small-data-to-redshift-32a32ece8e0a