Adding a table to a database
To add a table to a database, you can:
Create a table from a schema definition
Clone an existing table
Import data from a .csv file
Generate a table of static data based on an AI prompt
Create a SQL table based on data in other tables. For more information, go to Creating and managing SQL tables.
Creating a table from a schema definition
To create a table:
Click Add Table(s), then click From schema definition.
On the Add Table(s) panel, in the Name field, provide a name for the table.
Optionally, in the Schema Definition text area, provide one of the following to define the table schema:
SQL DDL script
OpenAPI spec
Content from another type of script or definition file, such as a JSON or XML schema or a DTD. The Fabricate AI then attempts to interpret the information and then use it to set up the table.
A prompt that describes the table. For example, "Create a table that tracks customers, including the mailing address, email address, and telephone number". The Fabricate AI uses that as the basis to set up an initial version of the table.
Optionally, expand More options, and in the AI Hints field, provide an additional prompt to help further define the table columns. For example, you might indicate specific generators to use, or provide limits on specific values.
Click Add Table.
Cloning an existing table
You can also create a clone of an existing table. The clone is created with the same columns and data as the original table. You can then adjust the table configuration.
To add a table that is a clone of an existing table:
Display the table that you want to clone.
Click Clone Table.
On the clone panel, in the New Table Name field, provide the name for the new table. By default, the table name is
<table_name>_COPY
. For example, if you clone the users table, the default name isusers_COPY
.Click Clone Table.
Creating a table from imported data
You can create a table from an imported CSV file. Fabricate uses the file to determine the table columns and data types, and to populate the table data.
To add a table based on an imported CSV file:
In the database header, click Add Table(s), then click From CSV file.
In the Name field, provide the name of the table.
To search for and select a file, click Choose File.
Click Import Table.
On the table details, Fabricate indicates that the table data came from a file. It marks the columns as having come from the source file.

Generating static data from an AI prompt
You can create a table of static data from an AI prompt. Fabricate also generates a CSV file of the table data.
To generate static data from an AI prompt:
In the database header, click Add Table(s), then click Generate static data using AI.
In the Table Name field, provide the name of the table. The table name is also used as the name of the CSV file.
In the Prompt field, provide an AI prompt that describes the data. For example:
List of states in the United States, the state abbreviations, and the year that the state joined the United States.
Click Generate Data. Fabricate displays the generated data.

To make adjustments to the data, update the prompt, then click Regenerate.
When you are satisfied with the generated data:
To download the data as a CSV file, click Download.
To copy the CSV to the clipboard, click Copy to Clipboard.
To create a table from the data, click Create Table. In the table header, the table is marked as imported from the CSV file.
Last updated