5 Replies Latest reply on May 7, 2018 10:15 AM by Isaac Kunen

    How do I qualify text in the Output Step?

    Jennifer McCarthy

      I worked with Tableau Prep for the first time today.  I love what it has to offer!  However, I can't figure out one simple thing. How do I specify a text qualifier (i.e. ") when outputting data to a CSV file?

       

      When I try to import the "cleaned" CSV file into SQL, the process fails because the text in the data isn't properly qualified. 

        • 1. Re: How do I qualify text in the Output Step?
          Joshua Milligan

          Jennifer,

           

          I don't believe version 1 has the option to specify a text qualifier.  If it does, I'm missing it.  I would definitely welcome that addition!

           

          The behavior I see is that text values with commas are qualified while text values without are not.  That seems to work fine when opening in Excel, but probably not with a SQL import.  I'm not sure that there is a good solution other than feedback to the developers that this functionality is missing.

           

          -Joshua

          • 2. Re: How do I qualify text in the Output Step?
            Lari McEdward

            It's not very elegant, but as a workaround, you could create a calculated field to add those quotes around your text fields. (And if you name the calculated field the same as the underlying field, you won't have to worry about any pesky cleanup, it'll make the change right in that field in one go.)

            qualifier.PNG

             

            Would something like that get you what you need for now? I definitely recommend suggesting a feature in the ideas forum to make this easier, though!

             

            Lari

            • 3. Re: How do I qualify text in the Output Step?
              Joshua Milligan

              Lari,

               

              I'm not sure that will work, because I think what will happen then is that Tableau Prep will then qualify the values of the field by wrapping in quotes again - in fact it will replace the single quotes form the calculation with double quotes and then qualify the string with an additional set of quotes.

               

              Meaning that you will get something like:

               

              """The Best Title Ever, The Worst Qualified String"""

               

              for the output instead of

               

              "The Best Title Ever, The Worst Qualified String"

               

              Now, that may get around the SQL Server import issue (and then a little cleanup on the SQL side will correct the quotes).  An alternative would be to insert a comma somewhere in each value which will force Tableau Prep to qualify every value.  Still will require the cleanup on the SQL Server side after import - which obviously isn't ideal.

               

              I'll definitely upvote any idea submitted to resolve this!

               

              Best Regards,

              Joshua

              • 4. Re: How do I qualify text in the Output Step?
                Lari McEdward

                Ahhh, I see, thank you for clarifying! Hmm, definitely sounds like an Idea, then

                • 5. Re: How do I qualify text in the Output Step?
                  Isaac Kunen

                  Josh isn't missing anything: this isn't an option today. Please do file/vote the Idea up!

                   

                  -Isaac