[openspending-dev] API returning **** (asterisks) instead of an actual string

Everton Zanella Alvarenga everton.alvarenga at okfn.org
Thu Oct 17 04:05:48 UTC 2013


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
request<http://openspending.org/api/2/search?q=&pagesize=100&format=json&dataset=orcamento_publico_brasil&filter=subfuncao.name%3A608>)
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
(here<http://openspending.org/api/2/search?q=&pagesize=100&format=json&dataset=um_teste&filter=subfuncao.name%3A608>and
here<http://openspending.org/api/2/search?q=&pagesize=100&format=json&dataset=um_teste&filter=subfuncao.name%3A609>).
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, [1] 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
data).

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?)

Thanks!

Tom

[1] 123701 rows were read, but only 123683 entries created. Check the
unique key criteria, entries seem to overlap.

-- 
Everton Zanella Alvarenga (also Tom)
OKF Brasil - Rede pelo Conhecimento Livre
http://br.okfn.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/openspending-dev/attachments/20131017/e63f329a/attachment.htm>


More information about the openspending-dev mailing list