The connection and use for Google Sheets imitates that of regular databases.
This connection will allow you to run SQL Lite commands against a google sheet.
A connection to a private sheet is similar to the connection process in the BigQuery connection and needs a Google Service Account with according permissions.
The Writeback Block will only work with a private Google Sheets connection.
Connecting to a public sheet needs no further permission can be done by simply adding the Google Sheets public url to the connector.
In the Google Sheet, click "Share" to the top-right, choose the access level and click "Copy link":
You can now add your sheet as a database in PushMetrics/d/d/connect
.
The Connection name corresponds to the name of your "database" and the names of your sheets to "tables".
To allow access to a private spreadsheet, a number of steps are necessary
In Summary:
Navigate to the projects view of the Google Cloud Console, and create a project:
The name of your project is used an identifier.
Organization and Location should be selected automatically, if your account belongs on to an organization.
If you are not redirected to your project, click here.
The content of the JSON KeyFile is what we need to paste into the connection form to authorize the connection.
You now have the KeyFile and will need to give some further permissions to enable access to your Google Sheets.
For this step you have to be Google Admin.
Head to https://admin.google.com/ac/owl/domainwidedelegation?hl=en_GB
- https://www.googleapis.com/auth/drive.readonly
- https://www.googleapis.com/auth/spreadsheets
Finally you will have to enable the APis for Google Sheets and Google Drive.
Head to the following two links and click "Enable".
https://console.cloud.google.com/apis/api/sheets.googleapis.com/overview
https://console.cloud.google.com/apis/library/drive.googleapis.com
You can now paste the contents of your JSON KeyFile into the Service Account field in the connection form.