Set up Google Sheet and query data using SQL in DuckDB.
1
Go to this link to add Google Sheets. Add a name for your integration and then hit Authorize. Definite will take you thru the OAuth flow for Google Sheets.
2
On the home page, click New Canvasin the upper right corner of the screen.
3
Click SQL.
4
Select DuckDB.
5
Copy the Google Sheet ID from the sheet’s URL. Ensure the Google Sheet access is set to Public (Anyone with the link).
6
Enter the code below and hit Run.
Copy
Ask AI
select*fromread_gsheet('<insert GSheet ID here>')
For more options on how to read or write Google Sheets with SQL, please refer to the DuckDB Google Sheets documentation.Success! You are ready to query your data using SQL!