0

I want to load data into titanDB and i know about bulkloading and gremlin script will do that but i want to do the same using spark. i have data in json format and i want to load it using spark. They integrate the spark with titan in titan 0.9 and 1.0.0. but using SparkGraphComputer i can read the data from titan but i want to do opposite of it, i want to write data into titan using spark

References http://tinkerpop.apache.org/docs/3.1.0-incubating/#sparkgraphcomputer

https://groups.google.com/forum/#!topic/aureliusgraphs/DGwJnpdHPmU

Mayur
  • 31
  • 4
  • Welcome to StackOverflow. Please refer to http://stackoverflow.com/help/how-to-ask to learn how to ask a good question. – Itai Bar-Haim May 04 '16 at 07:07
  • do you think its not a good question?? – Mayur May 04 '16 at 11:45
  • I did not understand it, but besides that, you did not provide examples for what you have tried. You did provide links to some documentation which indicates research on your behalf, but I don't think that's enough. – Itai Bar-Haim May 04 '16 at 12:28
  • Thanks for your reply ok i want to load data into titanDB and i know about bulkloading and gremlin script will do that but i want to do the same using spark. i have data in json format and i want to load it using spark. They integrate the spark with titan in titan 0.9 and 1.0.0. but using SparkGraphComputer i can read the data from titan but i want to do opposite of it, i want to write data into titan using spark – Mayur May 05 '16 at 05:47
  • 1
    Better if you update your question. Regardless, I won't be able to help you as I'm not familiar with Titan. Still, update your question so others might. – Itai Bar-Haim May 05 '16 at 06:09
  • sure thanks for helping me – Mayur May 05 '16 at 06:44

1 Answers1

3

You need to use TinkerPop's BulkLoaderVertexProgram:

http://s3.thinkaurelius.com/docs/titan/1.0.0/titan-hadoop-tp3.html

You can see some examples of how it works in this Titan data migration sample repository:

https://github.com/dkuppitz/openflights

as well as this example for loading data via CSV:

https://groups.google.com/forum/#!msg/gremlin-users/AetuGcLiBxo/KW966WAyAQAJ

stephen mallette
  • 45,298
  • 5
  • 67
  • 135