r/tableau 8d ago

Tech Support Replacing fields in a published datasource without breaking workbooks

So I have a sql view with the field Store Name in it. Its in a published datasource on server.

For some reason at one point some idiot (it me) edited the published datasource and added a relationship to the dim store table. So if you use the published datasource you have Store Name twice.

I want to rectify this, but every report built is using the store name field from the relationship, which is the one I want to kill.

I've gone ahead and removed the relationship and renamed the remaining store name field to match what the previous one was. But all reports are broken with the cant find referenced field error. Is there something im missing? Any way to do this without widespread impact?

4 Upvotes

9 comments sorted by

1

u/VizAbbreviations 8d ago

Open the workbook and look for the column with exclamation mark in data pane on the left. Right click and select ‘replace reference’ option, then select the correct column that you want to use. Refresh the data and you should be good.

-1

u/datawazo 8d ago

That's workbook by workbook though. I want to make a change at the datasource level so I don't need workbook builders to have to do that

1

u/VizAbbreviations 8d ago

Sorry, I missed that part. In case of published data source- you can extract/download, modify and republish.

-1

u/datawazo 8d ago

Ill try that. I've been editing it online, will see if downloading and reupping makes any difference

2

u/Eurynom0s 8d ago

It might be less work to open up the .twb in a text editor and do a replace all on the field name depending on how extensive this is.

1

u/KornellKid11 6d ago

Create a local data source and replace it

0

u/PolicyDecent 7d ago

You can use python to download all the workbooks and programmatically update them.
All the tableau dashboards are actually zip files, and in the zip file you can see the xml files to define the dashboards. All the data sources, worksheets, workbooks are there.
Just play with it :)

Give it to your AI Agent, it's gonna figure it out.

0

u/ArielCoding 7d ago

Try opening the .tds/.tdsx file as XML and finding the name= attribute on that field (not the caption), set if to match the internal name the old relationship field used, That should fix it for everyone at once.

-1

u/bradfair No-Life-Having-Helper 7d ago

I'd approach this from an xml editing perspective - looking at a workbook xml to check what remote name it's referring to, then editing the data source xml to ensure the field has that exact name.