[openspending-dev] Error trying to use a composite classifier in unique_keys

Friedrich Lindenberg friedrich.lindenberg at okfn.org
Mon Nov 28 21:34:01 UTC 2011


Hi,

have you tried using "programme.id" instead of "programme" in the unique_keys?

- Friedrich

On Mon, Nov 28, 2011 at 10:24 PM, David Cabo <david.cabo at gmail.com> wrote:
>  Hi all,
>  I ran into an issue while importing Spanish budget data [1] into the
> Sandbox OpenSpending today. I was trying to set 'unique_keys' in the model
> mapping file to ["year", "programme"], where 'programme' is a composite
> classifier with two fields
>       "fields" : [
>         {"column" : "programme.id", "datatype" : "id", "name" : "name"},
>         {"column" : "programme.label", "datatype" : "string", "name" :
> "label"}
>       ]
>  But the importer kept failing, complaining that the SHA key generation
> function expected a string/buffer, not a dictionary. (Sorry, don't have a
> copy of the stack trace, but could reproduce it if needed.) I've worked
> around this by adding an extra column with a unique id for each entry, but
> it's not ideal. Is this meant to be supported, or is it a bug?
>  regards,
> /david
> [1]: http://thedatahub.org/dataset/spain-national-budget-2008-2011
>
> _______________________________________________
> openspending-dev mailing list
> openspending-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/openspending-dev
>
>




More information about the openspending-dev mailing list