Last active
August 29, 2015 14:08
-
-
Save retrography/1295ba19d0caa73a5dfe to your computer and use it in GitHub Desktop.
A Scriptella configuration file for exporting data directly from Neo4j into a MySQL database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd"> | |
<etl> | |
<description>Scriptella ETL File Template.</description> | |
<!-- Connections with batch-loading configuration --> | |
<connection id="graph" driver="org.neo4j.jdbc.Driver" | |
url="jdbc:neo4j://graphserver:7474"> | |
statement.fetchSize = 1000 | |
</connection> | |
<connection id="project" driver="com.mysql.jdbc.Driver" | |
url="jdbc:mysql://sqlserver:3306/database" user="root" password=""> | |
statement.batchSize = 1000 | |
</connection> | |
<!-- ETL Queries and Scripts --> | |
<query connection-id="graph"> | |
MATCH (p:Package)-[r1]-(f:File)-[r2]-(s:Snippet) | |
RETURN p.title AS package, f.name AS file, s.sha AS sha | |
ORDER BY p.title; | |
<script connection-id="project"> | |
INSERT INTO test (package, file, sha) | |
VALUES (?package, ?file, ?sha); | |
</script> | |
</query> | |
</etl> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't forget to put this xml file in Scriptella's
bin
directory and the JDBC driver files intolib
directory.