Setting up tables
Depending on how you setup your project, you may already have tables created in your project. If not, click the "New Table" button to create a new table.
The order of your tables on the Project overview page is the order that the tables will be generated. This is important if there are dependencies across tables (such as with foreign keys). You can change the order of the table dependencies by dragging the cards.
[TODO - image of many tables]
To rename or delete a table, right click on the card.
Setting up a table
Click on one of the cards to get started with defining the data generation in a table. This will take you to the table editor. If this table was created from a database or CSV, the columns will already be there. If not, click "Add column" to get started.
Each column requires a generator function. Click the dropdown to select one. Once you've selected a function, the required input parameters can be entered below.
[TODO - column with parameters]
Column dependencies
A record's fields are often dependent on eachother in different ways. For example, in a 'person' table, a person's email by correspond to their name, and their name might correspond to their gender.
Datalus allows you to encodethese dependencies by allowing a generated field to
be the input to another fieldin the same row. For example, the name
field can
become the input to the email
generation function so that if someone is named
"Bob Dylan", their email can be generated to be something like
"bob.dylan@gmail.com". This allows you to create more realistic notional data.
The data is generated left to right in the same order of the colums in the table editor. You can rearrange the order of these columns by dragging the handle at the top of each column panel.
Once your columns are in the correct dependency order, click the icon to the right of the parameter you want to input the previous field to.
[TODO - dependency button]
When this is selected, you can choose a previous column of the matching data type.
Foreign Keys
Records are often related to other parts of the database, such as with foreign keys. Datalus supports generating these relationships. To learn more, check out Generating foreign keys.
Testing your table
Datalus makes it easy to quickly iterate on your table setup before you run a large generation job. Once your table setup is in a valid state, click "Test generator" and it will begin a small generation job to help you get a sense of what the output is. Because your table may depend on previous tables in your project, it will also generate every table before it.
[TODO - test generation output]