Re: How to see the ns (name space) values of janus graph


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...@...:

Hi 

I am using the below code to load the RDF data to janus graph -

from rdf2g import setup_graph
DEFAULT_LOCAL_CONNECTION_STRING = "ws://localhost:8182/gremlin"
g = setup_graph(DEFAULT_LOCAL_CONNECTION_STRING)

import rdflib
import pathlib

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 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 <b...@...> wrote:
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...@...:

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.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgr...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/45747944-d5be-47aa-999f-231d6d598b2dn%40googlegroups.com.

Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.