tableau / community-tableau-server-insights

Community-built data sources for answering questions about Tableau Server
MIT License
127 stars 52 forks source link

Duplicate underlying datasource ID in TS Data Connections #38

Closed MarnixKolder closed 1 year ago

MarnixKolder commented 4 years ago

In the example below I have two data published sources, one on one site, and one on another. There's two workbooks on each site and both contain an embedded data source referencing their site's respective published data source. However you can see below [TS Data Connections] reports two underlying data sources for each workbook - one is the correct one, but one is the corresponding data source from the other site.

TS Data Connections

Is this a bug? Can it be rectified? I am trying to count the number of workbooks connected to each data source, but I'm getting the wrong information. If I was to count the workbooks connecting to data source 3774, I'd get 4 - two on the Default site and two on the Development site. Now this has to be wrong, of course, because we know we can't connect a workbook on one site to a published data source on another.

Thanks

MarnixKolder commented 4 years ago

Further to this, I had a go at at least creating a temporary solution.

I basically have limited understanding of what I am doing, but I altered the name [Data Sources (Custom SQL)] table to include the following clause: image

Then I just use this new field to link to a copy of the [sites] table to pull info about the site related to the underlying datasource: image

Bringing the underlying site name into view allows me to see where the Site Name and Underlying Site Name agree or not. image

I can then filter out where they disagree and I get the correct results - 2 published data sources, one on each site with two workbooks connected to each of those two datasources... image

As I say, it's a temporary fix and hardly rigorous, but it might help in creating something more permanent...

mcoles commented 4 years ago

Pretty sure it's this join that is the problem, in the Data Sources (Custom SQL):

image

MarnixKolder commented 4 years ago

Is that because the link is based on a name and I have assets with the same name on different sites?

mcoles commented 4 years ago

Yes, exactly. At the time I originally built this, I had been under the impression that the repository_urls were unique across server. But that doesn't actually make sense, and was never true. So this is a bug, and we just need to add the criteria of site_id into the join.

donnacoles30 commented 3 years ago

Just came on here to advise I'd found issue, and then seen this thread - doh!

Yeah I fixed by adding an additional join query to the join statement Matt has highlighted above : p_dc.site_id = p_ds.site_id

mcoles commented 1 year ago

Fixed in next version

mcoles commented 1 year ago

This is resolved with the 04.01 release.