[openspending-dev] API returning **** (asterisks) instead of an actual string
tryggvi.bjorgvinsson at okfn.org
Mon Oct 21 17:00:24 UTC 2013
I looked at the sources for the dataset on the about page and noticed
that the file from 2012 contains the asterisks you want to get rid
of. That's why they show up in OpenSpending.
On fim 17.okt 2013 04:05, Everton Zanella Alvarenga wrote:
> Hi all,
> I'm seeing a weird behavior when I have an API request with a dataset I'm
> working on. When I try to extract the subfuncao dimension with the id 608 (the
> and 609 (the request<http://openspending.org/api/2/search?q=&pagesize=100&format=json&dataset=orcamento_publico_brasil&filter=subfuncao.name%3A609>),
> it returns lots of ****, instead of the a expected string ("PROMOCAO DA
> PRODUCAO AGROPECUARIA" for the id 608, for instance).
> I tried to load the same CSV on a testing dataset and it is returning the
> name correctly for this two ids
> Both datasets are not the actual I am using in a project. Actually, I
> created the orcamento_federal_brasil dataset to try to solve this after I
> discovering that the um_teste dataset didn't show up this problem.
> One difference between both datasets is that when I loaded this CSV for the
> one where the problem appears (orcamento_federal_brasil) is that it
> returned an error that a few entries were not created,  whilst in the
> other all entries are loaded without any error. The problematic dataset
> also have other CSV's loaded.
> Here is the CSV<https://dl.dropboxusercontent.com/s/qp2z43j6shc0juk/2013-limpo-com_filtro.csv>.
> I used the command uniq to check if there are repeated lines, but there are
> not. Those strings being transformed into asterisks also don't have any
> uncommon character, like accents (common on several other fields of this
> Any idea on what is happening, have experienced this or have some light on
> how to go further to check how are these strings converted into asterisks?
> (Maybe someone can point me the function of OS code that returns it through
> the API?)
>  123701 rows were read, but only 123683 entries created. Check the
> unique key criteria, entries seem to overlap.
> openspending-dev mailing list
> openspending-dev at lists.okfn.org
> Unsubscribe: http://lists.okfn.org/mailman/options/openspending-dev
Technical Lead, OpenSpending
The Open Knowledge Foundation <http://okfn.org>
/Empowering through Open Knowledge/
http://okfn.org/ | @okfn <http://twitter.com/OKFN> | OKF on Facebook
<https://facebook.com/OKFNetwork> | Blog <http://blog.okfn.org/> |
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openspending-dev