In Tableau 9.3, this process is now automatic, but if you are using any of the earlier versions, this is the correct method for publishing a data source from a workbook then connecting that workbook to the data source. It is very common to miss out on this step (which is why it has been automated in 9.3).
Once you’ve connected to a data source and done all your re-namings, hidden your fields, built calculations, etc., the first step is to right-click and press “Publish To Server”.
You’ll see the publish dialog — chose a good name and pot it in the right project and all that good stuff.
Then it will say successful and think you are done, but you are not. Notice that the icon next to the data source name hasn’t changed. When you are using a Published Tableau Data Source, you will see a blue boxy Tableau icon there, not the generic database icon.
You need to actually connect to the Tableau Server data source
Then find the data source that you published (try to remember what you named it!)
Now you will have both data sources, the original and the published version, in your workbook. If you have not created any content, you can just close the original data source. If you have created content, use “Replace Data Source” to swap in the identical version that is on Tableau Server.
Now you are connected to the published data source.