Readme.adoc
March 31, 2015 ยท View on GitHub
== Relational to Neo4j Importer
Scans Database Metadata to determine how to model Uses Parallel Batch Importer to ingest data from all tables in parallel
Blog Post: link:docs/relational_to_neo4j_import_tool.adoc[]
=== Usage
Currently you need http://maven.apache.org/download.cgi[apache maven] installed.
Command line parameters are:
import-rdbms-mvn.sh "jdbc:url" "schema" "graph.db"
e.g.
import-rdbms-mvn.sh "jdbc:mysql://localhost:3306/northwind?user=root" "northwind" "northwind.db"
=== Transformation Rules
- Table with primary key become nodes
- FK (1:1, 1:n and n:1) become relationships
- Tables with no PK and exactly two FK and properties become relationships (optionally also if there is a pk)
- Tables with more than two FK become nodes
- remove all fk fields
=== Todo
- Table name, column name transformation
- Modeling Rules by table name pattern
- Type transformation
- Skipping Columns / Rows
- Unique Constraints
- Indexes
- Compound Indexes (create artificial property)
- Skip keys
- Limit row rounds, by time
- Custom SQL statements
- Configure concurrency for JDBC reads
=== Ideas
neo4j-rdbms-import --into ... --relationship-rule no-pk, two-fk, table% | default: no-pk --skip table% table%.field,table_.id | default none --rename: label: Capitalize,UP_CASE,camelCase,CamelCase | default:CapitalizeCamel relationship: property:
- include and exclude with patterns (% and _)