Skip to content

pass it an sql file with "InsertInto" statements and it will return you cypher text (Neo4J)

License

Notifications You must be signed in to change notification settings

wtjerry/sqlToCypher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

what does it do

It will convert a sql file containing 'InsertInto' statements to cypher text

how to config it

Appart from the path to the sql file you also need to provide 3 dictionaries with configurations:

tables_to_convert_to_nodes

tables_to_convert_to_nodes

  1. Table name in sql that should be converted to a cypher node
  2. Id column in sql. The value of this column will be used as the cypher node identifier.
  3. Node name in cypher text

foreign_key_relationship_tables

foreign_key_relationship_tables

This config dictionary is only required if there are foreign key relationships in the sql file. Each item in this config relates to a cypher relationship to be generated.

  1. Table name in sql that has a foreign key
  2. Id column (doesnt need to be in the same table as 1.) of which the value relates to a cypher Node identifier. Is used as the source of the relationship
  3. Id column (doesnt need to be in the same table as 1.) of which the value relates to a cypher Node identifier. Is used as the destination of the relationship
  4. Node name in cypher text. Will be written as all upper case.
  5. Column in sql in table 1. which should not be converted to a attribute in cypher text. Can be used to not convert the foreign key column

many_to_many_relationship_tables

many_to_many_relationship_tables

This config dictionary is only required if there are many to many relationship tables in the sql file. Each item in this config relates to a cypher relationship to be generated.

  1. Table name in sql that is a many to many relationship table
  2. Id column in table 1. of which the value relates to a cypher Node identifier. Is used as the source of the relationship
  3. Id column in table 1. of which the value relates to a cypher Node identifier. Is used as the destination of the relationship
  4. Node name in cypher text. Will be written as all upper case

About

pass it an sql file with "InsertInto" statements and it will return you cypher text (Neo4J)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published