[ckan-dev] Datastore register "Null" for fields with value "0"

Henrik Korsgaard henrikkorsgaard at gmail.com
Mon Jun 10 13:31:49 UTC 2013


Hi Jorge

Did you set the type of each field when the dataset was created in the
datastore?, i.e. {"id":"some_name", "type":"int"}

I had a similar experience where postgres 'casted' a string containing
numbers, e.g. "123" to an integer and then responded with an error if the
record fields was "123d". I changed the fields of the dataset and included
the type for every field, and now postgres is acting normal.

Lesson learned - always set the type when creating dataset in datastore.

-Henrik


On 10 June 2013 14:49, Jorge Pantoja <jorgepantojam at gmail.com> wrote:

> Hi everyone,
>
> I was checking the datastore values for some datasets that I´ve added and
> I noticed that for fields that have "0" as a value, are registered with
> Null. I’ve checked this with the API and in the postgres database. I´ve
> uploaded CSV and XLSX files. I’m using Ckan 2.0 (installation from source).
>
> What might the problem be?
>
> Thanks again for your help,
>
>
> Jorge
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
>


-- 
Med venlig hilsen - Best regards,

*Henrik Korsgaard*
Phone: +45 22377114
Office: CAVI 114b, Aarhus University

NB. I am slowly migrating my university related correspondence to my
official AU mail: korsgaard at cavi.au.dk - feel free to contact me at that
address if relevant.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130610/d6456be8/attachment-0001.html>


More information about the ckan-dev mailing list