LogoLogo
Release notesDocs homeFabricateTonic.ai
  • Tonic Fabricate User Guide
  • Fabricate workflow
  • Tutorial videos
  • Fabricate account
    • Getting started with Fabricate
    • Fabricate license plans
    • Managing your Fabricate account and profile
    • Managing users in your account
  • Databases
    • Supported database types
    • Creating and managing databases
  • Backing up and restoring the database definition
  • Configuring database variables
  • Exporting data from a database
  • Tables and columns
    • Managing database tables
      • Configuring table settings
      • Adding a table to a database
      • Removing a table from a database
      • Attaching static data to a table
      • Regenerating table data
  • Managing table columns
    • Adding and removing columns
    • Configuring a column
    • Generator reference
      • Calculated or related values
      • Unstructured Data
      • Data type and specific values
      • Names and other identifying information
      • Telephone numbers and email addresses
      • Geographic locations
      • Air travel
      • Natural science
      • Networks and files
      • Banking and finance
      • Dates and times
      • Vehicles
      • Companies and products
      • Healthcare and health insurance
      • Languages
      • Movies
      • Education
    • Fabricate custom SQLite functions
  • Views
    • Creating and managing views
    • Views reference
  • Workspaces
    • About workspaces
  • Creating and managing workspaces
  • Database mock API
    • About mock APIs
    • Defining a mock API
    • Creating and querying database snapshots
  • Mock API reference
  • Fabricate API and CLI
    • Managing Fabricate API keys
    • Daily limits on generated data
    • Using the Fabricate API
      • Authentication for the API
      • Data model
        • Database attributes
        • Entity (table) attributes
        • Constraint attributes
        • Column attributes
          • General column configuration
          • Calculated or related values
          • Unstructured Data
          • Data type and specific values
          • Names and other identifying information
          • Telephone numbers and email addresses
          • Geographic locations
          • Air travel
          • Natural science
          • Networks and files
          • Banking and finance
          • Dates and times
          • Vehicles
          • Companies and products
          • Healthcare and health insurance
          • Languages
          • Movies
          • Education
      • Managing databases from the API
      • Generating data from the API
    • Using the Fabricate CLI
      • Setting up CLI access
      • Using the CLI to load data
  • Self-hosted Fabricate
    • Fabricate architecture
    • Setting up the Fabricate components
    • Limiting login attempts
    • Starting a Fabricate instance
    • Upgrading a Fabricate instance
Powered by GitBook
On this page
Export as PDF
  1. Fabricate API and CLI
  2. Using the Fabricate API
  3. Data model

Entity (table) attributes

An entity is equivalent to a database table.

Each entity object can contain the following attributes:

{
  "name": string,
  "records": string,
  "unique_records_for": string,
  "record_count": string,
  "view": boolean,
  "sql": string,
  "is_static": boolean,
  "source": {
    "data": string,
    "filename": string
  },
  "constraints": constraint[],
  "fields": field[]
}

name

The name of the entity.

records

Use exact to generate an exact number of rows. Use unique to generate one row for each unique value of a field in this entity.

unique_records_for

Only applies when records is set to unique. The name of the field that determines the number of unique rows to generate for this entity.

record_count

An expression that evaluates to the number of rows to generate for this entity. Only used for entities where the row count is not determined by a foreign key relationship. Ignored if either:

  • records is set to unique

  • The entity has one or more fields that use the Foreign Key generator with a distribution set to something other than none.

view

If true, the entity is generated as a view.

sql

If view is true, the SQL to use to generate the view.

Otherwise ignored.

is_static

true if the entity is backed by a static CSV file.

Otherwise false.

source

Present if the entity is backed by a static CSV file or has an attached CSV file.

source.data

The raw data from the CSV file.

source.filename

The name of the CSV file.

constraints

List of constraints.

fields

List of fields.

For views, this is ignored.

Last updated 5 days ago

For the list of constraint attributes, go to .

For the list of field attributes. go to .

Constraint attributes
Column attributes