Google Sheets Export
Allow one-click exporting of query result data directly to Google Sheets.
Service Account Setup
You will need a Google Cloud service account that will be used to create and upload data to Google Sheets.
- In Google Cloud, enable the API for Google Sheets and Google Drive.
- Add a Google Cloud Service Account.
- Create a JSON key for your service account.
- Make the JSON key available to your Superset server.
Configuration
-
Enable the
GOOGLE_SHEETS_EXPORTfeature flag in yoursuperset_config.py:FEATURE_FLAGS = {..., "GOOGLE_SHEETS_EXPORT": True, ...} -
Add and configure the following settings in your
superset_config.py:GOOGLE_SHEETS_EXPORT_SERVICE_ACCOUNT_JSON = ... # JSON as specified here https://docs.gspread.org/en/master/oauth2.html#for-bots-using-service-account
GOOGLE_SHEETS_EXPORT_SHARE_PERMISSIONS = {
'email_address': 'your-domain.com',
'perm_type': 'domain',
'role': 'writer',
}See the gspread documentation for more info on permissions.
To share with anyone use:
GOOGLE_SHEETS_EXPORT_SHARE_PERMISSIONS = {
'email_address': None,
'perm_type': 'anyone',
'role': 'writer',
}