Skip to main content

Data in Google Sheets

While Cluvio is a SQL-based analytics tool and for most of its functionality requires a connection to a SQL database or data warehouse, an exception is working with data from Google Sheets spreadsheets.

In addition to the common ETL-based approach to pull data from non-SQL sources, you can use the R support in Cluvio to pull data from a sheet using the googlesheets4 R library. This data can then be combined with SQL results (if desired), processed in R, or used directly to render via any of the standard charts in Cluvio.

info

Google Sheets needs to be accessed via a link that has the "Anyone with the link can view" permission.

Here is R code for a working example with some dummy data from this google sheet:

sheets_deauth(); # needed to prevent googlesheets4 to try authorization
read_sheet('17gmagAuoySXnjjQqzjLt1DFWO_2Z70l9wXL3KDfGkiY')

Here is the resulting report: https://dashboards.cluvio.com/dashboards/v5dy-lk81-q6z3/shared?sharingToken=c8c57637-5c39-48fe-a05b-fa3b15a4fe89

Note that you can combine this with the SQL results in R, but if you just need to pull the Google Sheets data you would still need to provide a SQL query, so use e.g. SELECT 42; to make it fast.

image-500image-500