I am using Tableau Prep to manipulate data from .csv files and upload the data to a MySQL database. When reading the .csv files, Tableau Prep determines the data type of all columns automatically. However, for some columns of some tables, it determines the datatype incorrectly. I have investigated what is happening.
One of the tables has 7501 rows. In certain columns, the first 1335 of these rows contain just a 0. The 1336th row contains a decimal number, and other rows further down do as well. However, Tableau reads this column as a “whole number”. I now I can manually change the datatype of a column, but this does not not help me, since then I would need to manually configure the datatype Tableau Prep reads in for 250 columns for 29 .csv files I am reading (=7250 columns !!!). And even if I would actually do this all manually, the number of manual operations that I have then defined seems to be to much for Tableau Prep to handle (I have tried it for a single table, which was not successful, the flow never completed loading).
Is there a solution to make sure I am reading in all my data correctly? Or will I have to resort to resolutions outside of Tableau Prep?
#Tableau Prep
What you say is true. Tableau Prep uses the first 1000 values to infer the data type.
As a workaround, if you change the 0 value to 0.0, Tableau will infer the column is a decimal, and therefore, you won't need to change the field type.
If this post resolves the question, would you be so kind to "Accept this Answer"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.
Regards,
Diego Martinez
Tableau Visionary and Tableau Ambassador