2 Replies Latest reply on Apr 22, 2018 11:18 PM by kumar bharat

    Struggle to read CSV with Null values

    megan.mccarty.0

      Hello,

      I have a CSV file with 8 columns.  The first half of the file has values in the first 4 columns and nulls in the last 4 columns.  In the second half of the file, it is switched, i.e. nulls in the first 4 columns and data in the last 4 columns.  For example,

      1,2,3,4,,,,

      1,2,3,4,,,,

      1,2,3,4,,,,

      1,2,3,4,,,,

      1,2,3,4,,,,

      ,,,,5,6,7,8

      ,,,,5,6,7,8

      ,,,,5,6,7,8

      ,,,,5,6,7,8

      ,,,,5,6,7,8

       

      Tableau reads the first half of the file just fine but returns all nulls in the second half.  It is like it just assumes the trailing columns are always nulls and doesn't actually read them.  As an experiment, I mixed up the rows so that "Tableau couldn't get use to the format" and it actually worked; Tableau read the file perfectly.  For example, I re-organized it to look like:

      1,2,3,4,,,,

      ,,,,5,6,7,8

      1,2,3,4,,,,

      ,,,,5,6,7,8

      1,2,3,4,,,,

      ,,,,5,6,7,8

      1,2,3,4,,,,

      ,,,,5,6,7,8

       

      Unfortunately, this solution only works some of the time.  The real data is very large and is created through UNION of different data sources.  Using sorting, I'm able to force the rows to intermix together.  However, sometimes the sorting doesn't intermix them enough for Tableau's liking and I again get visualizations with all null values.

       

      I can't include my real data and have been unable to create dummy data that reproduces the problem.  So, I understand it maybe difficult to help me here.  But has anyone ran into this problem?  Or anyone have some ideas?

       

      Thanks