# Neo4j as rdf store and run the sparql on the store data

**URL:** <https://community.neo4j.com/t/neo4j-as-rdf-store-and-run-the-sparql-on-the-store-data/61579>\
**Category:** General\
**Tags:** spring, neo4j, spring-data-neo4j--n, rdf\
**Created:** [March 21, 2023, 1:04pm UTC](https://community.neo4j.com/t/neo4j-as-rdf-store-and-run-the-sparql-on-the-store-data/61579 "2023-03-21T13:04:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasannajeet.v](https://avatars.discourse-cdn.com/v4/letter/p/7cd45c/32.png) [@prasannajeet.v](https://community.neo4j.com/u/prasannajeet.v)\
**Post date:** [March 21, 2023, 1:04pm UTC](https://community.neo4j.com/t/neo4j-as-rdf-store-and-run-the-sparql-on-the-store-data/61579/1 "2023-03-21T13:04:33Z")

</div>

Hi , i'm using neo4j as a backend store for my rdf data and i want to run the sparql queries on it using spring boot , is it possible using rdf4j ? or there is another tool to perform this action

thanks

---

<div class="post-metadata">

**Author:** ![michael.hunger](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/michael.hunger/32/27377_2.png) [@michael.hunger](https://community.neo4j.com/u/michael.hunger)\
**Post date:** [April 4, 2023, 11:45pm UTC](https://community.neo4j.com/t/neo4j-as-rdf-store-and-run-the-sparql-on-the-store-data/61579/2 "2023-04-04T23:45:29Z")

</div>

Unfortunately sparql itself is not supported.

If you can transform your queries to cypher queries it should work.

---

<div class="post-metadata">

**Author:** ![jesus\_barrasa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jesus_barrasa/32/27513_2.png) [@jesus\_barrasa](https://community.neo4j.com/u/jesus_barrasa)\
**Post date:** [April 6, 2023, 9:10am UTC](https://community.neo4j.com/t/neo4j-as-rdf-store-and-run-the-sparql-on-the-store-data/61579/3 "2023-04-06T09:10:08Z")

</div>

Yes, rewriting your queries in cypher is your best option.  
Alternatively there's an "spo" query procedure in n10s but I see that as more suitable to build integrations than to write complex queries. Have a look, it's `n10s.rdf.export.spo`

A query like this would return all instances of `Actor`

```auto
call n10s.rdf.export.spo(null, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "neo4j://graph.schema#Actor")

```

and would be the equivalent of the sparql query:

```auto
select ?s ?p ?o
where {
  ?s ?p ?o 
  filter( ?s = rdf:type && ?o = neo4j:Actor )
}

```
