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
      • 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
  • 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
    • About the Fabricate API and CLI
    • Managing Fabricate API keys
    • Daily limits on generated data
    • Using the Fabricate API
      • Authentication for the API
      • Data model
      • Managing databases from the API
      • Generating data from the API
    • Using the Fabricate CLI
      • Setting up CLI access
      • Using the CLI to load data
Powered by GitBook
On this page
  • Creating a snapshot
  • Querying a snapshot
  • Downloading a snapshot
  • Removing a snapshot
Export as PDF
  1. Database mock API

Creating and querying database snapshots

Last updated 6 days ago

To provide data for the mock API to query, you create database snapshots. Fabricate stores the snapshot data internally.

Creating a snapshot

To create a database snapshot of the current database data:

  1. If no snapshots are currently configured, click Create a DB Snapshot.

  2. If there are existing snapshots, then:

    1. Click the snapshot dropdown.

    2. In the dropdown, click Create New Snapshot.

  1. On the Create DB Snapshot panel, in the Snapshot Name field, provide a name for the snapshot. Fabricate provides a default value of v<snapshot count>. For example, v1 or v2.

  2. Click Create Snapshot. Fabricate generates the snapshot and adds it to the dropdown list.

Querying a snapshot

To verify the snapshot data works as expected, you can run queries against the snapshot.

To query a snapshot:

  1. Click the snapshot dropdown.

  2. In the dropdown list, select the snapshot to query against.

  3. Click SQL.

  4. On the SQL Editor panel, enter the query, then either:

    1. Press Enter.

    2. Click Run Query.

Downloading a snapshot

You can download a snapshot. The snapshot is downloaded to a file named <database name>.sqlite.

To download a snapshot:

  1. Click the snapshot dropdown.

  2. In the dropdown list, click the download icon for the snapshot.

Removing a snapshot

To remove a snapshot:

  1. Click the snapshot dropdown.

  2. In the dropdown list, click the delete icon for the snapshot.

Dropdown list of database snapshots