Creating and managing SQL tables
About SQL tables
Fabricate SQL tables allow you compose virtual tables from data in other tables. They are particularly useful for:
Denormalization
Aggregation
Subsetting
JSON objects and arrays
When you export a database, SQL tables are exported as concrete tables.
Adding a SQL table
To add a SQL table to a database:
In the database heading, click Add Table(s), then click From SQL query.
On the Add Table From SQL Query panel, in the Name field, provide a name for the SQL table.
Click Create Table.
The SQL table is added to the tables list for the database.

The details page for the SQL table is displayed.
Configuring a SQL table
Defining the SQL table
To define the SQL table, in the query text area, provide the SQLite query to use. The SQL table definition accepts any valid SQLite query.
Configuring other SQL table settings
To display the settings panel for the SQL table, in the SQL table heading, click the settings icon.
The SQL table settings contain most of the same options as regular tables, including:
Constraints - For more information, go to Configuring constraints for the table.
Whether to include the SQL table in the export - For more information, go to Indicating whether to include the table in the export.
A seed to use for the SQL table - For more information, go to Setting a table-wide seed value.
Regenerating data for a SQL table
To regenerate the SQL table data based on the current SQL table definition, in the SQL table heading, click the regenerate icon.
Deleting a SQL table
To delete a SQL table, in the SQL table header, click the delete icon.
Last updated