Add relationship by hand with Neo4j ETL


(M Kiuchi) #1

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...

(Alberto De Lazzari) #2

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.

(Michael Hunger) #3

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?

(M Kiuchi) #4

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

(M Kiuchi) #5

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.