[ckan-dev] Datastore register "Null" for fields with value "0"
Dominik Moritz
dominik.moritz at okfn.org
Tue Jun 11 20:27:20 UTC 2013
Hey Jorge,
Can you show me an example?
Cheers,
Dominik
On 11 Jun 2013, at 00:30, Jorge Pantoja <jorgepantojam at gmail.com> wrote:
> 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
>>
>>
> _______________________________________________
> 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
Dominik Moritz
CKAN developer | skype: d.moritz | @doobly_doo
The Open Knowledge Foundation
Empowering through Open Knowledge
http://okfn.org/ | @okfn | http://ckan.org | @CKANproject
More information about the ckan-dev
mailing list