Search code examples
socrata

Socrata get data types of dataset columns


Using the API how can i get the data types for the columns of a dataset?

I am creating a application to import data sets into an SQL database, an automated way to find the data types would be helpful.


Solution

  • The easiest place is to find that in the headers of the response itself. Check out the X-SODA2-Types header in this sample response

    I'm checking with our engineering team to see whether X-SODA2-Types is really deprecated, as per the warning.