Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is filtering on custom namespace elements possible? #568

Closed
andylolz opened this issue May 6, 2020 · 5 comments
Closed

Is filtering on custom namespace elements possible? #568

andylolz opened this issue May 6, 2020 · 5 comments

Comments

@andylolz
Copy link
Contributor

andylolz commented May 6, 2020

For example, usg:treasury-account/usg:regular-account@code=72.

I tried naively tried this one, but wasn’t able to get it to work. Is there some way to apply a filter like this?

Thanks!

@xriss
Copy link
Collaborator

xriss commented May 6, 2020

It should be, although with a few restrictions that you may have hit, although I have not tested it so there may be other problems.

Where exactly is usg:treasury-account/usg:regular-account@code expected?

The restrictions are:

No indexes in the data base so any query will be rather slow.

No repeated elements, so if usg:treasury-account is repeated multiple times only the last one will be available.

@xriss
Copy link
Collaborator

xriss commented May 6, 2020

@xriss
Copy link
Collaborator

xriss commented May 6, 2020

and that link should work now as I've bumped the size of requests the server will accept.

and you may want to take a look at the dquery that is used to get what you want

http://d-portal.org/dquery/#SELECT%20DISTINCT%20aid%20FROM%20xson%0AWHERE%0A%09root='/iati-activities/iati-activity/transaction'%0AAND%0A%09xson-%3E%3E'/usg:treasury-account/usg:regular-account@code'%20=%20'72'%0A

The simpler old style q version will not work for non standard elements as they get filtered out.

@notshi
Copy link
Collaborator

notshi commented Jun 1, 2020

Hi @andylolz - does this work for you? Just wondering if I can close this issue.

@andylolz
Copy link
Contributor Author

andylolz commented Jun 1, 2020

Oops! Apologies for not replying. Yes, this is great thanks! Close away.

@notshi notshi closed this as completed Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants