Hi,
Neo4j 3.5.6 Desktop, Windows 10.
I'm trying to re-create the database described here: https://dzone.com/articles/neo4j-and-virtual-nodesrelationships.
The code in GitHub (GitHub - scsosna99/lobbying-filings: Neo4J database loaded with info from US federal lobbying filings) uses a custom Java importer to import XML, but I want to use the standard XML import (apoc.load.xml) to do the same.
Here's an example of one of the XML files: 2015_1_1_1.xml · GitHub
The code is here: Importing lobbyist XML data using APOC · GitHub, and works except for the bit where I want to create the :ENGAGES and :EMPLOYS relationships.
How do I create the relationship between Registrant and Lobbyist?
The part that's failing is between lines 32 and 35
with filing, f, item, clients, registrants, lobbyists, governmentEntities, issues
match(r)-[:FILED]->(f)
match(lo)-[:LOBBYING_FOR]->(f)
create(r)-[:EMPLOYS]->(lo)
It's creating a cartesian product instead of the relationships I want for each individual filing.
Any pointers would be appreciated.
Regards,
Derek.