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.
This example shows how to use the Cassandra Neo4j Connector to convert the music playlist dataset from Cassandra into Neo4j:
- Ensure Cassandra and Neo4j are running
- Clone this repository:
git clone https://github.com/neo4j-contrib/neo4j-cassandra-connector.git
cd neo4j-cassandra-connector/connector
pip install -r requirements.txt
- note only Python 3.4+ is currently supportedpython connector.py parse -k playlist
- this will parse the schema metadata for the specified Cassandra keyspace and generate a fileschema.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
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.
- 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.
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.