1
votes

I am trying to upload a CSV file to a CKAN DataStore and one of its columns was determined as type Numeric even though one of the values in that column was alphanumeric. The result is an error when Datapusher tries to load this very record.

Is there a way I can correct the Datastore type for a particular column in the file?

Versions:

Ubuntu 14.04.5 LTS

CKAN version 2.6.0 (installed from package)

Postgresql 9.3

1

1 Answers

0
votes

Final answer:

The datapusher is guessing datatypes based on data at the beginning of the file, later this turns out to be a bad guess and a string cannot be turned into a number. The latest CKAN (try it on beta.ckan.org) has a workaround for this: try the upload/datapush once, then after it is finished (with failure), use the data dictionary (e.g. https://beta.ckan.org/dataset/{dataset name here}/dictionary/{resource id here} to override the data type of the column, then go to the datastore and do the push again.

Original answer:

Does it manage to load the file but just not that record, or does it give up? If you upgrade to 2.7 and use the latest Datapusher code, I think you can use the Data Dictionary feature to set the type manually, manually start the push to datastore again, and it will use the type you have set instead of the guess.