Created
January 30, 2016 15:06
-
-
Save tfoldi/fa15d88b0ef04fcc74e2 to your computer and use it in GitHub Desktop.
Get published data sources with workbooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * | |
from datasources | |
inner join data_connections on (data_connections.name = datasources.name) | |
inner join workbooks on (data_connections.owner_id = workbooks.id) | |
where data_connections.dbclass = 'sqlproxy'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This query will return a more reliable match as there could be more than datasource with the same name on your server
select w.id as workbook_id, w.name as workbook_name, d.id as datasource_id, d.name as datasource_name from data_connections dc join workbooks w on dc.owner_id=w.id join datasources d on w.id=d.parent_workbook_id where dc.caption = 'Sample - Superstore' and dc.dbclass = 'sqlproxy' ;