Skip to content

neo4j-contrib/neo4j-cassandra-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neo4j Cassandra Data Import Tool

Welcome to the Neo4j Cassandra Data Import Tool project. The main goal of this project is to provide a prototype for the task of importing a dataset from Cassandra into Neo4j.

Please be aware that this project is still under development and at this first stage will work only for a restricted set of data models. Please check our docs to have more information of the covered scenarios and a detailed instruction set for using this tool.

Looking for contributors If you are interested in contributing to this project we would love to hear from you and encourage you to submit a Pull Request.

Example usage

This example shows how to use the Cassandra Neo4j Connector to convert the music playlist dataset from Cassandra into Neo4j:

  1. Ensure Cassandra and Neo4j are running
  2. Clone this repository: git clone https://github.com/neo4j-contrib/neo4j-cassandra-connector.git
  3. cd neo4j-cassandra-connector/connector
  4. pip install -r requirements.txt - note only Python 3.4+ is currently supported
  5. python connector.py parse -k playlist - this will parse the schema metadata for the specified Cassandra keyspace and generate a file schema.yaml. Edit this file to specify the graph structure you would like to use to import your data. See example here. An example is provided: cp schema.yaml.example schema.yaml
  6. python connector.py export -k playlist -t track_by_id,artists_by_first_letter - this will export the data from Cassandra using CSV as an intermediary and import the data into Neo4j per the specified graph data model.

TODO

  • Allow user specified CQL queries. Currently the full table is exported, however a custom CQL query can be substituted here.
  • Python 2.x support. Currently only Python 3.x is supported.
  • Add test suite.
  • More robust graph model configuration. See documentation for column to property graph mapping confiruation options.

License

Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Python command line application for inserting data from Cassandra into Neo4j

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages