Skip to content
This repository was archived by the owner on Oct 8, 2020. It is now read-only.

Commit 094ae2e

Browse files
committed
Merge branch 'release/0.3.0'
2 parents 75ec2b3 + 97a3d3d commit 094ae2e

34 files changed

Lines changed: 2674 additions & 409 deletions

File tree

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ release.properties
77
dependency-reduced-pom.xml
88
buildNumber.properties
99

10+
11+
# Temporary files created by BSBM - should update bsbm to not generate those
12+
dataset.nt
13+
steadystate.tsv
14+
15+
1016
.cache-tests
1117

1218
.settings
@@ -16,6 +22,7 @@ buildNumber.properties
1622

1723

1824
deptree.txt
25+
dups.txt
1926

2027
### Java template
2128
*.class
@@ -38,6 +45,8 @@ hs_err_pid*
3845

3946
.cache-main
4047
.iml
48+
.idea
49+
*.iml
4150

4251
stat*.txt
4352

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# SANSA Query
2+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.sansa-stack/sansa-query-parent_2.11/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.sansa-stack/sansa-query-parent_2.11)
3+
[![Build Status](https://ci.aksw.org/jenkins/job/SANSA-Query/job/develop/badge/icon)](https://ci.aksw.org/jenkins/job/SANSA-Query/job/develop/)
4+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
5+
[![Twitter](https://img.shields.io/twitter/follow/SANSA_Stack.svg?style=social)](https://twitter.com/SANSA_Stack)
26

37
## Description
48
SANSA Query is a library to perform queries directly into [Spark](https://spark.apache.org) or [Flink](https://flink.apache.org). It allows files to reside in HDFS as well as in a local file system and distributes executions across Spark RDDs/DataFrames or Flink DataSets.
@@ -23,11 +27,17 @@ See the [available layouts](https://github.com/SANSA-Stack/SANSA-RDF/tree/develo
2327
The following Scala code shows how to query an RDF file SPARQL syntax (be it a local file or a file residing in HDFS):
2428
```scala
2529

26-
val graphRdd = NTripleReader.load(sparkSession, new File("path/to/rdf.nt"))
30+
val graphRdd = NTripleReader.load(spark, new File("path/to/rdf.nt"))
2731

2832
val partitions = RdfPartitionUtilsSpark.partitionGraph(graphRdd)
29-
val rewriter = SparqlifyUtils3.createSparqlSqlRewriter(sparkSession, partitions)
33+
val rewriter = SparqlifyUtils3.createSparqlSqlRewriter(spark, partitions)
34+
35+
val qef = new QueryExecutionFactorySparqlifySpark(spark, rewriter)
36+
37+
val port = 7531
38+
val server = FactoryBeanSparqlServer.newInstance.setSparqlServiceFactory(qef).setPort(port).create()
39+
server.join()
40+
3041

31-
val qef = new QueryExecutionFactorySparqlifySpark(sparkSession, rewriter)
3242
```
3343
An overview is given in the [FAQ section of the SANSA project page](http://sansa-stack.net/faq/#sparql-queries). Further documentation about the builder objects can also be found on the [ScalaDoc page](http://sansa-stack.net/scaladocs/).

0 commit comments

Comments
 (0)