{"id":10041,"date":"2023-05-11T16:42:14","date_gmt":"2023-05-11T21:42:14","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=10041"},"modified":"2023-05-11T16:44:37","modified_gmt":"2023-05-11T21:44:37","slug":"tableau-query-data-sources-and-the-workbooks-where-they-are-used","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=10041","title":{"rendered":"Tableau Query &#8212; Data Sources and the Workbooks Where They Are Used"},"content":{"rendered":"\n<p>I have found Tableau&#8217;s views of data sources to be &#8230; 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 &#8212; specifically, I was trying to see who was using Snowflake) and lists the site, project, and workbook using the data source. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n-- Data sources and what workbook they are used in\nSELECT system_users.email , datasources.id, datasources.name, datasources.created_at,  datasources.updated_at, datasources.db_class, datasources.db_name\n, datasources.site_id, sites.name AS SiteName, projects.name AS ProjectName, workbooks.name AS WorkbookName\nFROM datasources \nLEFT OUTER JOIN users ON users.id = datasources.owner_id\nLEFT OUTER JOIN system_users ON users.system_user_id = system_users.id\nLEFT OUTER JOIN sites ON datasources.site_id = sites.id\nLEFT OUTER JOIN projects ON datasources.project_id = projects.id\nLEFT OUTER JOIN workbooks ON datasources.parent_workbook_id = workbooks.id\n-- WHERE datasources.db_class = &#039;snowflake&#039; \nORDER BY datasources.created_at;\n\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>I have found Tableau&#8217;s views of data sources to be &#8230; 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 &#8212; specifically, I was trying to see who was using Snowflake) and &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1852],"tags":[1822],"class_list":["post-10041","post","type-post","status-publish","format-standard","hentry","category-tableau","tag-tableau"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10041"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10041\/revisions"}],"predecessor-version":[{"id":10042,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10041\/revisions\/10042"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}