-
1. Re: Postgres query to identify datasources not connected to a workbook
Matt ColesMar 25, 2017 12:49 PM (in response to Orlando Gomez)
4 of 4 people found this helpfulI have a connection pre-defined that should be able to answer this question quickly for you:
1. Go to Shareable Data Sources for Tableau Server
2. Download the TS Data Connections workbook and open it, pointing it to your PostgreSQL repository database.
3. Drag Datasource Name (underlying) from the Data Source (underlying) folder to Rows
4. Right-click and drag Workbook Id from the Workbooks folder to the Filter shelf. Pick Count (Distinct) for your filter, then select a range of 0 to 0.
The way the Hyperlinks are structured right now won't let you create an URL action for the "orphaned" published data sources without increasing the level of detail, which screws up your filter. I'll have to add a feature so that you could do that properly. But this should at least give you the names.
-
2. Re: Postgres query to identify datasources not connected to a workbook
Matt ColesApr 4, 2017 4:12 PM (in response to Matt Coles)
1 of 1 people found this helpfulI take that back, the Hyperlink - Default Page calc does seem to be working properly. Not sure what issue I ran into before, but they seem fine now...
-
3. Re: Postgres query to identify datasources not connected to a workbook
Luke Brady Jun 2, 2017 3:24 PM (in response to Orlando Gomez)Orlando Gomez take a look at the joins I've compiled. It might help you.
-
4. Re: Postgres query to identify datasources not connected to a workbook
shoba Hari Jul 12, 2017 10:32 AM (in response to Orlando Gomez)1 of 1 people found this helpfulHi Orlando Gomez,
Did you get a chance to identify which datasources are not being used.
Thanks,
Shoba
-
5. Re: Postgres query to identify datasources not connected to a workbook
Damien Lesage Jul 13, 2017 2:25 AM (in response to Orlando Gomez)1 of 1 people found this helpfulHello,
To find the "Oprhan Datasources", we use a query like:
SELECT ds.id as datasource_id, ds.name as datasource_name, ds.repository_url as datasource_url, p.name as project_name, s.name as site_name, nb_connected_workbooks FROM public.datasources ds INNER JOIN ( SELECT dbname, site_id, count(id) as nb_connected_workbooks FROM public.data_connections WHERE owner_type = 'Workbook' and dbclass = 'sqlproxy' GROUP BY dbname, site_id ) dc ON ds.repository_url = dc.dbname AND ds.site_id = dc.site_id JOIN public.projects p ON ds.project_id = p.id JOIN public.sites s ON ds.site_id = s.id WHERE ds.parent_workbook_id is null
To find whether the datasource is a server DS or is embedded in a workbook, you should be able to use the parent_workbook_id.
Hope this helps,
Damien.
-
6. Re: Postgres query to identify datasources not connected to a workbook
Orlando Gomez Aug 1, 2017 8:10 AM (in response to Damien Lesage)Thanks Damien I will try this out!
-
7. Re: Postgres query to identify datasources not connected to a workbook
shoba Hari Oct 2, 2017 8:13 AM (in response to Matt Coles)Matt,
This helps to identify only the data sources that are not being used.
I also found another challenge here.
We have data sources published to server but not being used in the workbook, instead they use embedded data source with the same name as published data source. Could you please help to identify the such data sources.
Thanks,
Shoba
-
8. Re: Postgres query to identify datasources not connected to a workbook
satish.parvathaneni Oct 2, 2017 3:26 PM (in response to Orlando Gomez)Check out this Custom Tableau Server Admin Views