This is the implementation of the Google Sheets data handler for MindsDB. Google Sheets is a spreadsheet program included as a part of the free, web-based Google Docs Editors suite offered by Google.Documentation Index
Fetch the complete documentation index at: https://docs.mindsdb.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before proceeding, ensure the following prerequisites are met:- Install MindsDB locally via Docker or Docker Desktop.
- To connect Google Sheets to MindsDB, install the required dependencies following this instruction.
- Install or ensure access to Google Sheets.
Implementation
This handler is implemented usingduckdb, a library that allows SQL queries to be executed on pandas DataFrames.
In essence, when querying a particular sheet, the entire sheet is first pulled into a pandas DataFrame using the Google Visualization API. Once this is done, SQL queries can be run on the DataFrame using duckdb.
The required arguments to establish a connection are as follows:
spreadsheet_idis the unique ID of the Google Sheet.sheet_nameis the name of the sheet within the Google Sheet.
Usage
In order to make use of this handler and connect to a Google Sheet in MindsDB, the following syntax can be used:sheet_name parameter.