Hi Tony - perhaps in this case it helps to understand a bit about file and connection types. A live connection is just what it says - a live connection to the database. An extracted connection is a snapshot of your data at whatever point in time it was taken.
If you have custom sql and want to publish either a workbook or data source to Tableau Server, you have the option for extract or live. You shouldn't be forced to choose one. An extract is always more performant, but if you have custom SQL that does something like check the current day and do some action based upon that, you will either want to extract daily (so that this part of the query computes correctly every day) or a live connection.
If you change the custom sql and you're using a live connection - just republish the workbook and you should be good to go. If you do the same but you're using an extract, when you toggle back to one of the sheets, Tableau should automatically regenerate the extract (or it will flip the connection to live) as it knows the old extract is no longer valid since the connection has changed.
Hope that helps.
Thanks Ben that helps a lot. one question, as you mentioned every time i change my custom SQL code and toggle back to one of the sheets, Tableau will automatically regenerate the extract. do i have to go to the data source and Extract the data as the picture below is showing? when i originally created the workbook and created the custom SQL code, i connected via Extract and not live and when I toggled to one of the sheet, Tableau asked me to create the extract so I did and saved it as TDE file. dis i still have to go to the data source and extract the data as the picture is showing?
If it regenerates the extract you do not need to go this route. In the above screenshot it doesn't seem like it has regenerated the extract, however, or Use Extract would not be greyed out. My suggestion would be to adjust your SQL and stay on the Data Source page. Just adjust the radio button at the top to be extract instead of live, and you should be good to go. As soon as you toggle back to a worksheet it will generate this on its own.