Beep beep can run scripts on SQL and NoSQL databases, track ran scripts and not run them again.
It can be used to:
- Create tables/indices/collections and populate them with data
- Prepare a database for unit testing with JUnit
- Setup and configure database for production use
With the same tool, these scripts can be run on:
- SQL scripts on relational databases using JDBC driver
- Sense scripts on Elasticsearch
- CQL scripts on Cassandra
- And so on...
Run all scripts in the script
folder on Elasticsearch located on localhost
and track their execution in the .beepbeep
index.
$ bin/beepbeep.sh -t elasticsearch -d http://localhost:9200 -s .beepbeep/script -f 'script/*.json'
START script/index_create.json
END_SUCCESS script/index_create.json:24
START script/index_data.json
END_SUCCESS script/index_data.json:15
Run all SQL scripts from the classpath on an H2 embedded database and replace ${variable}
placeholders in scripts by value.
new SqlPipelineBuilder()
.withConnectionProvider(Driver.class.getName(), "jdbc:h2:mem:test", "sa", "")
.withVariable("variable", "value")
.withResourcesScriptScanner(getClass().getClassLoader(),
"com/github/gquintana/beepbeep/script/**/*.sql")
.scan();
- Install Java DK 8 and Apache Maven 3
- Run Maven
mvn install
- Grab the
target\beepbeep-x.y-bin.zip
and unzip it anywhere - If necessary, add your JDBC driver Jar in the
lib
folder - If necessary, edit the configuration files in the
config
Documentation is in GitHub Wiki