Reputation: 378
I am facing the challenge of changing a column in our data warehouse which affects one tableau data source which then affects multiple reports.
If I rename the column, the report itself claims that this column does not exist any more an spits out an error. Having multiple reports attached to this datasource would imply that I need to open up all the reports and change them manually.
+----------+----------+-----------+----------------+----------+
| column 1 | column 2 | change -> | column renamed | column 2 |
+----------+----------+ +----------------+----------+
| data 1 | data 1 | | data 1 | data 1 |
+----------+----------+ +----------------+----------+
| data 2 | data 2 | | data 2 | data 2 |
+----------+----------+ +----------------+----------+
| data 3 | data 3 | | data 3 | data 3 |
+----------+----------+-----------+----------------+----------+
Is there a smart way of doing a column rename without changing all the reports?
Upvotes: 2
Views: 5533
Reputation: 19
As stated by Alex Blakemore in a comment to the answer,
"If you do manually edit Tableau workbooks and rename a field, you can right-click on the old field in the data pane in the sidebar and choose the "replace references" command -- a global search and replace command." – Alex Blakemore Aug 22 '17 at 16:41
Verified by myself that it works.
Upvotes: 1
Reputation: 378
If you want to rename a column in your database where tableau is running an extract on (and uses it for reporting) - there is no "tableau" way without fixing all the reports (and its elements) manually.
The only way I found so far is editing the workbook file directly. Tableau stores its workbooks in either twb or twbx files.
You can open these files (which are nothing else than XML files) directly in any editor of your choice like sublime / Atom / notepad.
Within these file you can find the columns which you want to rename in the DB. In the example I want to rename Column1 to column renamed.
Like in a normal texteditor just go for search&replace and replace all occurences of Column1 to column renamed.
The last step is to safe it (you should use a different filename to test if it works first) and open it in tableau. Without any big hustle you adapted your tableau workbook to all the renamed columns.
Upvotes: 1