question

Upvotes
Accepted
1 0 1 1

How to query .nt files in Apache Jena Server


Hi,

Sorry if this question is already answered on the forum. Please redirect me to the right page.


I have uploaded the organization file (OpenPermID-bulk-organization-20210307_112038.nt ) on the apache jena server.

Result: success. 57832465 triples

I am now on the query window but my queries don't return a response. Can someone share sample queries for organization files? sorry for the limited knowledge on this query language.


Few use cases I want to build :

1. Count of PermIds in the file

2. List of PermId having LEI associated with it




permid-apiintelligent-tagging-apiopen-permid-api
1.png (18.2 KiB)
2.png (35.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@mandeepsingh

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvotes
Accepted
78.8k 250 52 74

@mandeepsingh

I am new to SPARQL too. I think the query could be:

1. Count of PermIds in the file

SELECT (count(distinct ?s) as ?count)
WHERE { ?s ?p ?o }

2. List of PermId having LEI associated with it

SELECT ?permID ?object
WHERE {  
  ?permID <http://permid.org/ontology/organization/hasLEI> ?object .
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 1 1

Thanks for the response @jirapongse.phuriphanvichai. Not sure why I can't see the results while executing the above two queries.


3.png (36.0 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

From my test, it returns the following.

Can you check with this query?

SELECT ?permID 
WHERE {  
  ?permID <http://permid.org/ontology/organization/hasLEI> "5493000BPC9ZTGJKQW88" .
} 
1615971399111.png (76.0 KiB)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.