1 Reply Latest reply on May 30, 2016 8:19 AM by lenaic.ridinger

    Character limit for text files

    Morten Nielsen

      I'm trying to connect to this csv file locally on my computer, and I'm getting the following error message:

      Unavngivet.png

       

      From previous experiences I've found out that at least when connecting to xls/xlsx files, I get the "Error: 4: error generating sort key", when any value has a length of more than 255 characters.
      For this one however, the longest strings are 251. I've tried to minimize the length of all strings to 225, and... it works. But, I want to maintain as much string length as possible. I've tried pushing it to 245 characters - it worked too - that is, it worked the first time around, second time I got the same error. Some times I get another error message instead, saying simply "String Comparison Error". I'm really confused about what's causing this. Starting to think it might not be entirely dependent on the string character length, but that there's something else to it as well.

       

      Any ideas?

        • 1. Re: Character limit for text files

          Hi Morten Nielsen,

           

          As you said, it might be the characters.

          To resolve this error, determine the maximum string value allowed by your data source and then reduce the string length of the offending value accordingly.

          The maximum string length is displayed in the error message directly after"varchar". Then, do one of the following tasks:

          • If you are using a Microsoft Excel as data source, access and create a test row in the Excel file that contains the maximum length of the string values you expect to be entered in your data source. Excel uses the first few rows of the data to determine the maximum string length to enforce for string values. Save the file and connect to the data source from Tableau Desktop.
          • If you are using Microsoft SQL as a data source, access and edit the table schema to make the string value large enough to hold all the field values.

           

          This could help you as well:

          • Empty the Windows TEMP folder (default location: C:\TEMP).
          • Limit the size of the extract.
          • Use Tableau Desktop on a 64-bit computer.
          • Close other applications that you are not actively using.