[openspending-dev] Error trying to use a composite classifier in unique_keys
David Cabo
david.cabo at gmail.com
Mon Nov 28 21:24:08 UTC 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/openspending-dev/attachments/20111128/3e0db9e9/attachment.html>
More information about the openspending-dev
mailing list