Tableau Query — Data Sources and the Workbooks Where They Are Used

I have found Tableau’s views of data sources to be … lacking. To provide a report of data sources, the database type, and where it is being used, I put together a query that locates all data sources (or filters by database type — specifically, I was trying to see who was using Snowflake) and lists the site, project, and workbook using the data source.

-- Data sources and what workbook they are used in
SELECT ,,, datasources.created_at,  datasources.updated_at, datasources.db_class, datasources.db_name
, datasources.site_id, AS SiteName, AS ProjectName, AS WorkbookName
FROM datasources 
LEFT OUTER JOIN users ON = datasources.owner_id
LEFT OUTER JOIN system_users ON users.system_user_id =
LEFT OUTER JOIN sites ON datasources.site_id =
LEFT OUTER JOIN projects ON datasources.project_id =
LEFT OUTER JOIN workbooks ON datasources.parent_workbook_id =
-- WHERE datasources.db_class = 'snowflake' 
ORDER BY datasources.created_at;

Leave a Reply

Your email address will not be published. Required fields are marked *