1 Reply Latest reply on Jun 3, 2016 11:22 PM by Dmitry Chirkov

    How to create a New Custom SQL table with desired fields.

    Vengadasamy Krishnaraj

      Hi,  I have few tables created in MySQL.  While connecting with tableau, I am able to pull all the tables which are created in MySQL data base.  I need to pick up one or two column from each tables and  I want to create this as a separate table in tableau and every time I want to select this table for my analysis.  How do I create the desired fields in  New Custom SQL?.

        • 1. Re: How to create a New Custom SQL table with desired fields.
          Dmitry Chirkov

          Easiest way to achieve this is following:

          1. Create your join in Tableau
          2. Select Data > Convert to Custom SQL from the menu
          3. Remove all the columns that you don't need, close the dialog
          4. Now to to sheet, right click on the datsource and select "Add to Saved Data Sources"


          Now each time you start Tableau you'll have an easy shortcut to this datasource.


          May I ask though, why Custom SQL? Tableau won't be able to perform certain optimizations since it won't look inside Custom SQL and will always execute it in full.

          Why not keep it as a normal relation and just hide columns you are not interested in?