How can I force data types when importing csv files?
From CSV to CSVT
Given a csv file called
file.csv with the following structure:
You can create a type definition file,
For more information, you can check CSV GDAL documentation. Secondly, you need to compress both files and upload it dragging and dropping it on CARTO dashboard UI or via the Import API.
That will create a column
price as a double precision one, as opposed to the integer type when you don’t use the
To get a big picture about CARTO data management, you can continue reading Preparing and Formatting Data. The CARTO Glossary also contains useful definitions of all of the components, processes, and technologies regarding data management.