问题
We're using Talend Open Studio for Big Data to migrate MySQL data to Neo4j. I've gotten a few jobs to run, however I get stuck using the tNeo4jOutputRelationship compontent on a rels.csv file which contains relatioships between values that dont exist in our nodes.csv file.
Explicit error that is thrown:
Exception in component tNeo4jOutputRelationship_1
java.lang.RuntimeException: Start node looked up by index with my_index as key and my_value as value doesn't exist
Did a bit of research and found the portion of code throwing the error on Github
Is it possible to suppress this error temporarily at runtime? We do have quite a bit of restructured data and not every rels.csv is going to match the nodes.csv for each job.
回答1:
The easiest way that I see it is to create the nodes.csv file with ID you either have in MySQL or generate ids for the nodes when exporting from MySQL to nodes.csv.
Then, when creating the nodes using tNeo4jOutput, you also create an index for the ID you get from the MySQL data.

The next step is then to create a representation for the relationships in MySQL and export to CSV. This will have start and end IDs for the nodes that should be connected.

Then when using the tNeo4jOutputRelationship component you specify what index to use for looking up the IDs and specify the start and end IDs from the relationship.csv file.

来源:https://stackoverflow.com/questions/19327968/talend-neo4j-relationship-component-throws-error-when-start-node-doesnt-exist