Inverse Watch Docs
AppLanding
  • Overview
    • Home
    • Governance
      • Proposal 7
      • Proposal 25
      • Proposal 52
      • Proposal 107
      • Proposal 147 - S1
      • Proposal 189 - S2
  • Products
    • Inverse Alerts
      • See on Twitter
    • Inverse Chatbot
      • /doc
      • /imagine
      • /data
      • /graph
    • Inverse Subgraphs
      • See inverse-subgraph on Mainnet
      • See inverse-governance-subgraph on Mainnet
    • Inverse Watch
      • Go to App
  • User Guide
    • Quickstart
    • Alerts
      • Setting Up an Alert
      • Adding New Alert Destinations
      • Customize Alert Template
      • Multiple Column Alert
    • Queries
      • Creating and Editing Queries
      • Querying Existing Query Results
      • Query Parameters
      • How to Schedule a Query
      • Favorites & Tagging
      • Query Filters
      • How To Download / Export Query Results
      • Query Snippets
    • Visualizations
      • Cohort Visualizations
      • Visualizations How-To
      • Chart Visualizations
      • Formatting Numbers in Visualizations
      • How to Make a Pivot Table
      • Funnel Visualizations
      • Table Visualization Options
      • Visualizations Types
    • Dashboards
      • Creating and Editing Dashboards
      • Favorites & Tagging
      • Sharing and Embedding Dashboards
    • Data Sources
      • CSV & Excel Files
      • Google Sheets
      • JSON (API)
      • Python
      • EVM Chain Logs
      • EVM Chain State
      • GraphQL
      • Dune API
    • Machine Learning
      • Data Engineering
      • Regressors
        • Linear Regression
        • Random Forest
        • Ada Boosting
        • Gradient Boosting
        • Neural Network (LSTM)
      • Training and Predicting
      • Metrics & Overfitting
      • Examples
        • Price Prediction
          • Data Preprocessing
          • Model Creation & Training
          • Metrics Evaluation
          • Back Testing
          • Visualizing
        • Liquidation Risk
  • Admin & Dev Guide
    • Setup
    • Redash
    • Integrations & API
    • Query Runners
    • Users
      • Adding a Profile Picture
      • Authentication Options
      • Group Management
      • Inviting Users to Use Redash
      • Permissions & Groups
    • Visualizations
  • Cheat Sheets
    • Snippets
    • Contracts
  • More
    • Deprecated Apps
    • Github : inverse-flaskbot
    • Github : inverse-subgraph
    • Github : inverse-watch
Powered by GitBook
On this page
  • 1. Setup
  • 2. How to create a Google Service Account?
  • 3. Querying
  • 4. Filtering The Data
  • 5. A Note About Dates

Was this helpful?

  1. User Guide
  2. Data Sources

Google Sheets

PreviousCSV & Excel FilesNextJSON (API)

Last updated 1 year ago

Was this helpful?

1. Setup

2. How to create a Google Service Account?

  1. Click the “Create credentials” button. On the dropdown that appears, chose “Service account key”.

  2. On the following page, use the dropdown to select the project you elected in step 1. For role select Project > Viewer from the tree menu.

  3. Under key type, select JSON and hit “Create”

A .json file will then download to your computer. In the application under Settings, add a new data source for GoogleSpreadsheet. In the modal that appears, name this connection and upload the .json file you downloaded from the Google credentials console.

3. Querying

After the spreadsheet is shared with your Service Account email address, create a new query in the application and select your Google Sheets data source. In the query editor text box, type your desired Spreadsheet ID. You can optionally select a specific tab of your spreadsheet by adding its tab position as a zero-indexed number separated by a vertical bar or pipe symbol.

For example:

1DFuuOMFzNoFQ5EJ2JE2zB79-0uR5zVKvc0EikmvnDgk|0

to load the first sheet or

1DFuuOMFzNoFQ5EJ2JE2zB79-0uR5zVKvc0EikmvnDgk|1

to load the second. That’s the whole query. Leave out any SQL at this point.

What is the Spreadsheet ID?

You can find your Spreadsheet ID in its URL. So if the spreadsheet URL is:

https://docs.google.com/spreadsheets/d/
b94d27b9934d3e08a52e52d7da7dabfac484efe37

Then the ID will be:

b94d27b9934d3e08a52e52d7da7dabfac484efe37

This procedure might fail if your organization has restrictions on sharing spreadsheets with external accounts. To improve outcomes, be sure to create the Service Account with a Google account from the same organization.

4. Filtering The Data

When you connect a Google Sheet with the application, we load it in full. You can generate visualizations from the data and add it to your dashboards. If you want to filter some data or aggregate it beyond what a pivot table can accomplish, you can use one of the following methods:

5. A Note About Dates

To add a Google Sheets data source to the application, you first need to create a with Google. Service Accounts allow third-party applications to read data from your Google apps without needing to log-in each time. During Service Account setup you will be provided with a JSON key file. You need to upload this file to the application when setting up the data source.

Open the . If prompted, select or create a project.

Once you have setup the data source, you can load spreadsheets into the application. To do so, you need to share the spreadsheet with the Service Account’s email address. This can be found in the or in the JSON file under the "client_email" key. Sharing is done like you would share with any regular user.

Use the which allows you to query results from other queries.

Use to create a Google BigQuery external table based on the Google Spreadsheet

The application uses to parse dates from Google Spreadsheets. If you experience issues where the application parses the date incorrectly, try adjusting the date formatting in your sheet to ISO8601 or one of the formats shown .

Service Account
API Credentials Page
Google Sheets API credentials page
Query Results Data Source
Google BigQuery’s integration with Google Drive
Python-dateutil
here