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

Jorge Pantoja jorgepantojam at gmail.com
Mon Jun 10 22:30:23 UTC 2013


Hi Henrik,

I didn’t do that, because I was using the datastorer to automatically add
the files into the database. I will try to do the upload through the
datastore API specifying the type of the field. However, using the
datastorer, this still happens to me with the datasets that I want to
upload.


Thanks for your help,


Jorge




On Mon, Jun 10, 2013 at 3:31 PM, Henrik Korsgaard <henrikkorsgaard at gmail.com
> wrote:

> 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.
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130611/d953132b/attachment-0001.html>


More information about the ckan-dev mailing list