Create a Schema - Script Option

A Schema is a generated diagram to visualize your base structure and track changes to meta information for all tables, view, fields, and relationships. Understand your Airtable base configuration and view meta changes at a glance.

Learn more about On2Air: Schemas

On2Air: Schema

In this article

Before Creating a Schema
Schema Source Types
How to Create A New Schema Using the Script Option
Add Your Schema Script Code to Airtable
Generate a Schema Snapshot from Airtable
Filter Your Schema
Schema Changes
Base Tab
Tables Tab
Views Tab
Fields Tab
Print Your Schema Layout
Snapshot History
Share
Settings

Before Creating a Schema

Connect to Your Airtable Account

Note: Once a Schema is created and connected to a base, you cannot change which base is being used for that particular Schema. You will need to create a new Schema to connect to a different base.

Schema Source Types

There are three ways to set up a Schema for your Airtable base - API, Script, or Block

API
- Uses the Airtable API to connect with your base and generate a Schema

Benefits - Can use on Free and Pro Airtable accounts
No setup required inside Airtable
All setup is done in On2Air: Schemas dashboard

Limitations - Limited ability to view all changes due to restrictions in the Airtable API
Can view Relationship fields in the Schema, but cannot view how Relationships are connected

Script
- Uses a generated script code from On2Air to paste into an Airtable Scripting Block

Benefits - View and highlight all Relationship connections

Limitations - You must add the generated JavaScript code to an Airtable Scripting Block 
Currently available for Free and Pro plan in Airtable, but Airtable intends to remove Scripting Block option from Free plans in September 2020)

Block
- Coming Soon!

How to Create A New Schema Using the Script Option

Click New Schema

Enter a Name for your Schema

Choose the Script Source

Learn about each Source type

Select your Airtable connection

Select your Airtable base



Adding Your Schema Script Code to Airtable

Once you have created a Schema using the Script option, you will be directed to the Diagram tab

You will see a piece of JavaScript code you will need to add to your Airtable base

Click Copy to Clipboard to copy the script code to your clipboard

Click New Snapshot at the top right (OR Go to Airtable and open your base)

Click the Base link



Create a new Scripting block How to create a Scripting block

Paste the copied script code into the Scripting block field

Generate a Schema Snapshot from Airtable

To generate a Schema Snapshot from Airtable

Open the Scripting block containing your Schema script

Click Run

Click Rename Snapshot

Name your Snapshot

Click Next

Click Run Snapshot

A success message “The snapshot was created successfully.” will be displayed



Once you have created your Snapshot, return to the On2Air: Schema dashboard

You will now see your new Schema layout in the Diagram tab

New Schema in On2Air Dashboard

You can click through each tab to see the Tables, Views, and Fields

Schema All

From the Diagram tab, you can choose the dropdown to view a history of each snapshot

View Versions

You can Zoom In(+), Zoom Out (-), or Reset the Schema View

Zoom In, Out, and Reset

Filter Your Schema

By Default, all Bases, Tables, Views, and Fields are included in your Schema

You can filter your Schema by

Table
Field Type
Fields
Relationships

To filter Tables, Field Types, or Fields

Choose the Filter icon above your Schema

Choose your Table, Field Type, or Field filter by clicking the Edit icon

Toggle your filter On (Green) or Off (White)

Click Done in your individual filter page

Click Done on the entire filter page

Filter A Schema

To filter and view the connections in your Relationship field types

Available for Script Schemas

Toggle any desired Relationship field type On (Green)/ Off (White)

Linked Records (On by default)
Formulas
Rollups
Lookups
Count

Filter a Relationship Schema

Each Relationship connection is displayed and highlighted by a specific color

Gray - Linked Record Field
Purple - Rollup Field
Orange - Lookup Field
Blue - Formula Field
Red - Count Field



Save Filter Settings

You can save specific filters to reference as needed

Click the Filter icon

Select your Filter parameters

Click Save Filter

Name Your Filter

Click Done

Save a Filter

Schema Changes

In each tab, you can see changes for each Base, Table, View, or Field

Base Tab

Change - Type of Change
Before - Previous name of Base
After - New name of Base
Updated - Snapshot Timestamp
Snapshot - Snapshot name

Initial displays the first time the Schema was created

After changing the name of the Base

Base Name Change

Navigate Changes

Click Prev, Next, or a page number to navigate between the Base Changes pages

Refresh Schema

Click Refresh to generate any new Schema updates

Tables Tab

Name - Name of Table
Updated - Snapshot Timestamp
Snapshot - Snapshot name

When you click a Table name, you will see any Name Changes

Change - Type of Change
Before - Previous Table name
After - New Table name
Updated - Snapshot Timestamp
Snapshot - Snapshot name

Change Table Name

View Deleted Tables

Toggle View Delete Tables On (Green) to view any Tables previously deleted

Show Deleted Tables

Navigate Changes

Click Prev, Next, or a page number to navigate between the Table Changes pages

Views Tab

Choose the Table name containing the View you want to see



In each View, you will see

Name - Name of View
Last Update - Snapshot timestamp
Snapshot - Snapshot name

To see changes for a specific View, choose a View name

In each specific View, you will see

Change - Type of Change
Before - Previous name of View
After - New name of View
Updated - Snapshot Timestamp
Snapshot - Snapshot name

View Deleted Views

Toggle View Deleted Items On (Green) to view any Views previously deleted

Navigate Changes

Click Prev, Next, or a page number to navigate between the View Changes pages

Fields Tab

Choose the Table name containing the Fields you want to see

Change Table in Fields

In each Table, you will see your Field names and types

Name - Field name and type
Last Update - Last Updated Timestamp
Snapshot - Snapshot name

When you click a Field name, you will see any name changes

Change - Type of Change
Before - Previous Field name
After - New Field name
Updated - Snapshot timestamp
Snapshot - Snapshot name

Field Name Changes

View Deleted Fields

Toggle View Deleted Items On (Green) to view any Fields previously deleted

View Deleted Fields

Navigate Changes

Click Prev, Next, or a page number to navigate between the Field Changes pages

Print Your Schema Layout

In the Diagram tab, select your Print Layout area by clicking the Zoom In(+) or Zoom Out (-) icons

Choose Print Layout

Click View Print Layout

A new tab with your Schema layout will open

Choose Print from your browser

Print Schema Selection

Snapshot History

The Snapshots tab displays a history list of Schema snapshots

Name - Name of Snapshot

Logged At - Snapshot timestamp

Snapshot History

When you click a Snapshot name, you will see a list of any changes made in the chosen Snapshot in the Changes tab

Click Snapshot

You will see columns containing

Type - Type of Structure - Base, Table, View, or Field
Name- Name of Base, Table, View, or Field
Change - Snapshot name (Initial is first snapshot)
Before - Name before a change
After - New name

Refresh Schema

Click Refresh to generate any new Schema updates

Diagram in Snapshot

Click Diagram in a Snapshot History to see the Diagram at the time the Schema was captured

Schema at Time of Snapshot

Share

You can share a public version of your Schema with anyone else. You have two options to share.

Option 1

In the Share tab, click View Public Version to view your Schema through a public URL

View Public Schema

Option 2

Click Copy to Clipboard to copy the public URL for your Schema to you clipboard

Share the URL with others

Settings

Code - A unique ID for your Schema
Click Refresh to generate a new unique ID

Delete - To delete your schema, click Delete Schema
WARNING: This action cannot be undone

Delete Schema

Refresh - Click Refresh to generate any new Schema updates

New Snapshot - A window will open with your allowing you to click a link to your base
To generate a new snapshot, follow the steps Generate a Schema Snapshot from Airtable
This will also display the Script code that should be in your Airtable base
Was this article helpful?
Cancel
Thank you!