Add relationship by hand with Neo4j ETL

Hi all,
I'm started to try Neo4j ETL from Neo4j Desktop.
I've successfully imported source tables from MariaDB, but no relationship is generated. I looked around Neo4j Desktop UI(drag, right-click, and so on...), but cannot find any suggestions for creating and modifying relationships.

How do I configure mapping to have relationship between two corresponding nodes ?
Here is my environment

  • neo4j version=3.5.0, desktop version=1.1.13, browser version=3.2.14, etl-tool version=1.2.1
  • which database do you want to import from: MariaDB
  • a sample of the data you want to import
    • Node#1: Label=Genre
      • id: integer
      • name: string
    • Node#2: Label=TVProg
      • id: integer
      • name: string
      • genreid: integer
  • neo4j.log and debug.log, log files of ETL tool in the import directory: I'll share, if you need...

Hi,
the ETL tool automatically creates the relationships from the foreign keys. If you don't have any foreign key it will not create any relationships.
The current version doesn't give you any means to define the relationships using the UI.

1 Like

If you want to you can find the mapping.json file and add them there manually, but that's quite some work.

Did you create foreign-key constraints between your tables?

Thanks much !
I've not set foreign keys. I'll try.

Thanks !
Tweaking mapping.json is geeky, but sounds requiring some work as you mentioned. I'll try to add foreign key to source tables according to gentle manners.

Hi all,

Used the ETL Tool -- worked great.

It's fantastic that it can use foreign keys in a relational database
to create relationships. A very useful feature for the future would be to allow the user to map an origin node property to the entity name of the relationship.

Great work Neo4j team!
Tom

1 Like

The ETL tool worked great on one DB (mySQL), however, it's failing to recognize the relationships on a new DB we're working with, again, mySQL (not that it ought to make a difference as to whcih DB). The tables import. It's a small DB. 640 rows of data - tiny really, about 20 tables, all with a 1 to many relationship to a 'main' table - no extended parent->child relationships. It's so simply it ought to just work, but the ETL tool provides no meaningful means to peek into the workings. Long story short - it's not working and the result is a diassociated mess that ends up reaquiring a pile of manual intervention, work that shouldn't be necessary. Thoughts?

@byron, same here, for some reason, the foreign keys in my mssql also weren't reported as relationships. Not sure where went wrong. If anyone has figured out, hope to hear about your advice on this one.