0

When uploading CSV files to CartoDB through their web interface, all columns default to string as their data type, despite the CSV file containing a number of number-only columns. An example row is

1400000US55025000100,55025000100,"Census Tract 1, Dane County, Wisconsin",1401,118,1070,128,903,136,167,82,131,62,36,34,0,9,179,74,179,74,0,9,0,9,0,9,0,9,36,31,35,28,6,11,75,45

I know I can change the data type in the table editor, but when you have a large number of columns, this becomes very tedious. According to their documentation, CartoDB should automatically assigns the right data type. Any advice on how to make this work?

asked Mar 3, 2015 at 16:55

1 Answer 1

0

CSV does not have the concept of data types and that's why CartoDB tries to guess the type of the column. In any case CartoDB can not have a 100% success rate.

if you want to ensure your data types are kept use a format that allow data types (geojson, shp for example)

In this case I think it's a problem with ogr2ogr (the tool we use under the hood to process files). I reported this as a bug https://github.com/CartoDB/cartodb/issues/2600 so you can track it

answered Mar 4, 2015 at 8:50
1
  • Thanks! I'll follow your bug report on GitHub and for now just change the data types manually/with SQL. Commented Mar 5, 2015 at 16:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.