Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chimera-suite/test-spark-datatypes
Test OntopSpark's OBDA datatype conversions to be compliant with W3C standards
https://github.com/chimera-suite/test-spark-datatypes
obda spark test
Last synced: about 1 month ago
JSON representation
Test OntopSpark's OBDA datatype conversions to be compliant with W3C standards
- Host: GitHub
- URL: https://github.com/chimera-suite/test-spark-datatypes
- Owner: chimera-suite
- License: apache-2.0
- Created: 2020-11-05T22:00:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-07T14:10:35.000Z (almost 4 years ago)
- Last Synced: 2024-11-09T09:11:58.698Z (3 months ago)
- Topics: obda, spark, test
- Language: Shell
- Homepage:
- Size: 92.4 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
### SparkSQL --> XML Schema datatypes conversion in OntopSpark
SparkSQL reference :
W3C reccomended mappings :
| Spark datatype | SparkSQL name | W3C reccomandation | ONTOP default | OntopSpark |
|----------------|---------------|--------------------|---------------|---------------|
| BooleanType | BOOLEAN | xsd:boolean | xsd:boolean | |
| ByteType | BYTE, TINYINT | xsd:integer or subtype | xsd:integer | xsd:byte |
| ShortType | SHORT, SMALLINT | xsd:integer or subtype | xsd:integer | xsd:short |
| IntegerType | INT, INTEGER | xsd:integer or subtype | xsd:integer | xsd:int |
| LongType | LONG, BIGINT | xsd:integer or subtype | xsd:integer | xsd:long |
| FloatType | FLOAT, REAL | xsd:float or xsd:double | xsd:double | xsd:float |
| DoubleType | DOUBLE | xsd:double | xsd:double | |
| DateType | DATE | xsd:date | xsd:date | |
| TimestampType | TIMESTAMP | xsd:dateTime | xsd:dateTime | |
| StringType | STRING | xsd:string | xsd:string | |
| BinaryType | BINARY | xsd:hexBinary or xsd:base64Binary | xsd:hexBinary | |
| DecimalType | DECIMAL, DEC, NUMERIC | xsd:decimal | xsd:decimal | |## Running the test
1. Build and run Apache Spark
```console
foo@bar:~$ sudo ./docker-build.sh
foo@bar:~$ sudo docker-compose -f docker-compose-spark.yml up
```2. Wait Apache Spark complete startup, then run OntopSpark in another console window
```console
foo@bar:~$ sudo docker-compose -f docker-compose-ontop.yml up
```2. Connect to [_localhost:8080_](http://localhost:8080/)
3. Execute the query, and check the datatypes
```
PREFIX :SELECT * WHERE {
?sub ?pred ?obj .
}
```