This content has been marked as final. Show 5 replies
You can use either addInBulk or prepareBulk followed by a completeBulk method call.
The following document has details
Be sure to dropApplicationTableIndex before you conduct the data loading. Also, if you have
a multi-core balanced hardware system, you can run the data loading in parallel.
I have a Table - TB_1. Model - MD_1.
I have triple Data in CSV/Excel File, below sample data is present in Column A, Column B and Column C of csv:
http://my.com/contains http://www.w3.org/2002/07/owl#inverseOf http://my.com/containedBy
http://my.com/MyBagXYZ http://my.com/contains http://my.com/item1
http://my.com/MyBagXYZ http://my.com/contains http://my.com/item2
http://my.com/MyBagXYZ http://my.com/contains http://my.com/itemn
This Data is in Millions. I thought of using "INSERT DATA " clause of SparQL but as Data is in millions, i am looking for a better way.
Can you help me how to read this CSV and Populate the model MD_1 using Jena and SparQL. Any Example would be of great help.
There are a few different approaches.
You can use tools like http://www.mindswap.org/~anant/quidicrc/ or http://xlwrap.sourceforge.net/ to convert
the CSV to RDF. Once you have the RDF, it is easy to bulk load it into Oracle.
Note that I haven't used the aforementioned tools. So please sanity check the generated RDF to make sure
conversion is 100% correct.
Alternatively, you can read the CSV file yourself using a Java code.
For each line, you generate a triple and then add the triple to an in-memory Jena model.
After you are done with the whole file, addInBulk the whole Jena model to Oracle.