How to see the ns (name space) values of janus graph
Arpan Jain <arpan...@...>
I have rfd data which is in turtle or xml format. Now the data is having the vertex property name in the form of URL so when I upload that data to Janus graph it converts those URL values to ns1,ns2 and goes on for each unique url. Now my first question is how the Janus graph is doing that and how I can get those ns values. Because I need to define my own schema for Janus graph because I need to upload bulk data and for bulk upload, the manual schema creation is required for fast upload speed. How I can crate schema for those URLs. I mean during schema creation we have to declare the property of vertices and in my case properties are url so what is the best way to achieve this. |
|
HadoopMarc <bi...@...>
Hi, I am not aware of any JanusGraph properties that apply specifically to rdf or url data. Can you explain how you "upload" an rdf triple to janusgraph and give an example how the data look like as input triple and as JanusGraph vertex and edge? Best wishes, Marc Op maandag 4 januari 2021 om 13:04:39 UTC+1 schreef ar...@...:
|
|
Arpan Jain <arpan...@...>
Hi I am using the below code to load the RDF data to janus graph - from rdf2g import setup_graph import rdflib OUTPUT_FILE_LAM_PROPERTIES = pathlib.Path("path/to/ttl/file/.nt").resolve() rdf_graph = rdflib.Graph() rdf_graph.parse(str(OUTPUT_FILE_LAM_PROPERTIES), format="nt") from rdf2g import load_rdf2g load_rdf2g(g, rdf_graph) and my data looks like - <http://www.hcds.com/hcdbs_cms_geo/Africa_Concept> <http://www.w3.org/2004/02/skos/core#altLabel> "Africa"@en . and after that vertice property, it looks like - property key - ns1:altLabel and its value - Africa property key - iri and its value is -
http://www.hcdbs.com/hcdbs_cms_geo/Africa_Concept
On Tue, Jan 5, 2021 at 7:48 PM HadoopMarc <bi...@...> wrote:
|
|
HadoopMarc <bi...@...>
Hi All the magic you mention happens in the python rdflib and rdf2gremlin packages, which I am not familiar with. I would inspect the API for the rdf_graph instance and see how to retrieve the required information to define the janusgraph schema. Hopefully, the load_rdf2g method respects the bulk loading recommendations from the janusgraph ref docs! Best wishes, Marc Op woensdag 6 januari 2021 om 12:02:55 UTC+1 schreef ar...@...:
|
|