Turtle file contains 0 triples - sparql

I want to upload turtle file into apache jena fuseki server. But when i upload , there is 0 triples uploaded
I have an ontology. I want to make some query on apache jena fuseki server. I upload the ontology file as turtle format. But there's 0 triples uploaded.
When i tried to upload with rdf format , there's triples uploaded as the picture below
Upload ontology file
Is there something i miss? why when i upload ontology in turtle format it says 0 triples uploaded , but when i upload in rdf format , it says there's triples in it? How can i fix this?
Thanks

Related

airbyte ETL ,connection between http API source and big query

i have a task in hand, where I am supposed to create python based HTTP API connector for airbyte. connector will return a response which will contain some links of zip files.
each zip file contains csv file, which is supposed to be uploaded to the bigquery
now I have made the connector which is returning the URL of the zip file.
The main question is how to send the underlying csv file to the bigquery ,
i can for sure unzip or even read the csv file in the python connector, but i am stuck on the part of sending the same to the bigquery.
p.s if you guys can tell me even about sending the CSV to google cloud storage, that will be awesome too
When you are building an Airbyte source connector with the CDK your connector code must output records that will be sent to the destination, BigQuery in your case. This allows to decouple extraction logic from loading logic, and makes your source connector destination agnostic.
I'd suggest this high level logic in your source connector's implementation:
Call the source API to retrieve the zip's url
Download + unzip the zip
Parse the CSV file with Pandas
Output parsed records
This is under the assumption that all CSV files have the same schema. If not you'll have to declare one stream per schema.
A great guide, with more details on how to develop a Python connector is available here.
Once your source connector outputs AirbyteRecordMessages you'll be able to connect it to BigQuery and chose the best loading method according to your need (Standard or GCS staging).

I want to setup dbpedia dataset locally

I want to setup DBpedia dataset locally, but I'm not sure how to do it. I have downloaded mappingbased_objects_en.ttl and infobox_properties_mapped_en.ttl.bz2, is there anything else I need to download,
now how can I query this using SPARQL ? do I need to install anything to make it queryable from sparql. is there any Database software for SPARQL like mysql ??
I tried http://dbpedia.org/sparql, but due to the restriction of 10000 query limit I want to setup DBpedia in my system
Any lead would be appreciated.
Thanks
PS: This two files (mappingbased_objects_en.ttl, infobox_properties_mapped_en.ttl.bz2) doesn't seems to have all the entity information for ex: Steve Jobs is not there in those files but Tim Cook is there and I'm certain Steve jobs is present in DBpedia.
You need to install DBPedia on a local triplestore, such as Virtuoso. I explain this in this article but here is the gist on how to install and query DBPedia locally with Virtuoso Triplestore:
The Virtuoso Open Source Edition can be downloaded from here.
Once Virtuoso is installed, run it and start VOS Database.
Go to Virtuoso admin page in the browser (you may have to give it a bit of time to start): http://localhost:8890/conductor/
Login with default credentials (dba/dba)
In tab “Quad Store Upload” for testing you can upload a ttl file to the specified named graph IRI, such as “http://localhost:8890/DBPedia”.
Next you can test the triplestore in the SPARQL tab or directly at the local endpoint. For example:
SELECT count(*) WHERE
{?category skos:broader <http://dbpedia.org/resource/Category:Environmental_issues>}
However the upload might fail for bigger files.
For bigger files and also for uploading multiple files, it is best to use the bulk upload.
In order to bulk upload files from anywhere (and not just the Virtuoso import folder), you must add your folder to the DirsAllowed property in the Virtuoso configuration file virtuoso.ini. You must restart Virtuoso for the changes in virtuoso.ini to be effective. For example, assuming that the dumps are in /tmp/virtuoso_db/dbpedia/ttl, you can add path /tmp/virtuoso_db to DirsAllowed.
Once Virtuoso is back and running, go the the Interactive SQL (ISQL) window and register the files to be loaded by typing in:
ld_dir('/tmp/virtuoso_db/dbpedia/ttl/','*.ttl','http://localhost:8890/DBPedia');
You can then perform the bulk load of all the registered files by typing in:
rdf_loader_run();
You can monitor the number of triples being uploaded by performing the following SPARQL query on the local endpoint:
select count(*) as ?c where {?a ?b ?c}
Although #firefly's answer is still correct, there is a much simpler way to setup dbpedia locally provided by dbpedia itself:
git clone https://github.com/dbpedia/virtuoso-sparql-endpoint-quickstart.git
cd virtuoso-sparql-endpoint-quickstart
COLLECTION_URI=https://databus.dbpedia.org/dbpedia/collections/latest-core VIRTUOSO_ADMIN_PASSWD=password docker-compose up
Source: https://github.com/dbpedia/virtuoso-sparql-endpoint-quickstart

Load OpenStreetMap data into Virtuoso

How can I load data from OpenStreetMap of a particulat area (e.g. Berlin) into the (open source) Virtuoso triple store which runs on my local computer (Ubuntu)?
I tried to download the particular OSM file and access it with sparqlify in order to convert it to RDF (or turtle etc.), which then later (at least that was my idea) could be loaded to Virtuoso using the bulk loading strategy. That did not work.
I would be happy if you could tell me if there is any other alternative how I could convert the osm files into RDF.... or, if there is a totally different approach?!
I also thought about using apache jena within Java to access the linkedgeodata access point directly, however, I guess having the data locally gives me much more performance at a later point when I run SPARQL commands.
Cheers

Fetch data from Factbook offline

Since Factbook's SPARQL endpoint is down, I downloaded the zip file of their data. I do not understand how can i fire SPARQL queries at it. Any idea as to how it can be achieved? The unzipped version doesn't have a single RDF file so Fuseki is giving me an error

Load multiple csv files from a directory using dataloader

I have data in multiple CSV files(having same header name) in a directory. I want to create vertices from those CSV files. How can i load all files with a single load using dse graph loader. because i have almost more then 600 csv file ?
You are correct that graph loader the tool for the job. The docs have a good example here.