Just as a follow up. Right now I'm crating a new data source with the updated SQL. Then I manually copy all the new formulas to the new data source from the old one. Then I extract the data over the old extract. Then I refresh the old data source and delete the new data source.
This process seems to work but I feel like there's an easier way to do this.
1 of 1 people found this helpful
I'm not sure I understand your issue. If you keep the database query/view name the same and refresh the data extract, Tableau will automatically pick up the new columns from the query. Here's my common process as an example:
- Build a query
- Start a new Tableau workbook, use the query as a datasource, import data as an extract because my server can be slooooooowwwww
- Build some calculated fields in the workbook
- Find out I could really use some other data from the DB
- Edit the query
- Refresh the extract, Tableau adds the new fields
- Continue building out the workbook and repeat as necessary
The one caveat to this is that if you've used Custom SQL, then that "fixes" your query and anytime you add new fields to the underlying database query/view then you'd have to edit the Custom SQL as well. I forget that one sometimes, which can be a bit of a painful reminder when it takes 15 minutes to rebuild the extract and then realize I hadn't edited the Custom SQL. For that reason, I try to do all my pre-Tableau data manipulation in the underlying DB so the Tableau data source just points to the query.
cool. so just so I understand, the query data source and the extract are separate objects but are still related. so if I updated the query data source and then refresh the extract
a) the extract gets the new changes
b) The extract doesn't lose any of the custom calculations
Is that correct?