DuckDB-GSheets: Read and Write Google Sheets in Pure SQL

by archiewoodon 11/4/2024, 3:07 PMwith 1 comments

by archiewoodon 11/4/2024, 3:07 PM

DuckDB GSheets is a DuckDB extension that allows you to read and write data from Google Sheets.

-- Install

install gsheets from community;

load gsheets;

-- Authenticate with the browser

create secret (type gsheet);

-- Read

select * from 'https://docs.google.com/spreadsheets/d/11QdEasMWbETbFVxry-Ss...'

-- Write

COPY <table_name> to 'https://docs.google.com/spreadsheets/d/11QdEasMWbETbFVxry-Ss...' (format gsheet);