d-gen is a tool for generating random data that conforms to user-defined relational database schemas.
d-gen generates databases in 4 steps:
- d-gen takes a high-level specification file that can contain generalities about the dataset and parses it into a low-level specification, removing all ambiguity and generalities.
- d-gen takes the low-level specification and creates the necessary data generators to create the dataset.
- d-gen generates the data using those data generators.
- d-gen serializes the resulting dataset into a standard dataset/database format.
As a pre-requisite, d-gen requires Java. All packages and dependencies are handled through a gradle wrapper.
- Clone this repository:
git clone https://github.com/raulcf/d-gen cd d-gen
- Install dependencies using gradle:
./gradlew build
Now, the main
method of Main.java
can be ran using ./gradlew run
.
-
Create a specification file. Specification files are how you determine the database schema and datatypes of the data to be generated.
-
Run the
Main
class using Gradle from the command line:gradle run --args="-i SPECIFICATION_PATH -o LOW_LEVEL_SPEC_OUTPUT_PATH"
SPECIFICATION_PATH
is the path of the specification file that defines the database to generate.-o LOW_LEVEL_SPEC_OUTPUT_PATH
is an optional parameter that points to the file to write the parsed low-level specification to.