Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support Dgraph data source #57

Closed
Nicole00 opened this issue Jan 17, 2022 · 2 comments
Closed

support Dgraph data source #57

Nicole00 opened this issue Jan 17, 2022 · 2 comments

Comments

@Nicole00
Copy link
Contributor

No description provided.

@Nicole00
Copy link
Contributor Author

Use Spark Connector to read dgraph data and write to nebula. for example: https://github.com/vesoft-inc/nebula-spark-connector/blob/master/example/src/main/scala/com/vesoft/nebula/examples/connector/NebulaSparkWriterExample.scala

  1. In user's project, add the dependency in pom:
<dependency>
  <groupId>uk.co.gresearch.spark</groupId>
  <artifactId>spark-dgraph-connector_2.12</artifactId>
  <version>0.4.2-2.4</version>
</dependency>
  1. read dgraph data
import uk.co.gresearch.spark.dgraph.connector._
val edges: DataFrame = spark.read.dgraphEdges("localhost:9080")
val nodes: DataFrame = spark.read.dgraphNodes("localhost:9080")
  1. write to nebula
df.write.nebula(config, nebulaWriteVertexConfig).writeVertices()

@Nicole00
Copy link
Contributor Author

do not integrate dgraph to Exchange. Reasons:

  1. The requirement is not general. Dgraph stores RDF, and use gql, which is used in knowledge graph, and now we don't have many requirements for it.

  2. Besides, there's other resolutions (showed above) for users to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant