Import a schema

After the import finishes

When every stage of a script import is done, the schema holds the objects from your script. Take a few minutes to check the result before you build on it.

In the app: Data Model › Schemas › your schema

[screenshot]
A schema after a successful import, on the Tables tab.

What you get

  • Tables with columns, types, primary keys, defaults and check constraints.
  • Indexes on their tables.
  • Relationships from the script’s foreign keys.
  • Views, stored procedures and functions with their SQL as written. Each one is analyzed in the background, which fills in its outputs, parameters and dependencies.
  • Enums for columns limited to a list of values.
  • Descriptions, only where the script included description statements such as sp_addextendedproperty or COMMENT ON.

Note: A script import doesn’t write descriptions of its own. Objects without a description statement in the script have none. Use Generate Descriptions to have AI write them.

Checklist

  • Spot-check tables. Open three tables at random. Are the columns, types and primary key right?
  • Check relationships. Open a parent table’s Relationships tab and confirm the child tables appear under Relationships To This Table. Suggest Relationships on the Info tab can find ones the script didn’t declare.
  • Check enums. Open the Enums tab and confirm each enum has the values you expect.
  • Check SQL objects. Look for red icons on the Views, Procedures and Functions tabs; they mark objects with broken dependencies. Open one or two objects and check their Output and Dependencies tabs.
  • Fill in descriptions. Select tables (or views, procedures, functions) and click Generate Descriptions. Existing descriptions are overwritten, so select only the ones you want.
  • Look at failed and skipped items on the import detail page. See Fix failed import items.
  • Confirm the dialect. If you imported a SQL Server script but target Snowflake, change Default Database Dialect on the Settings tab, or clone the schema to the other dialect to get converted code.
  • Create a version. Once you’re happy, click Create Version on the Info tab so you have a baseline. See How schema versioning works.

If many items failed

When the failures share a cause, such as a construct your script uses everywhere, fix the source file and import it again. With more than 15 failures, the import page offers Download Failed DDL to collect the failed DDL in one file.

Tip: Importing again into the same schema is safe. Objects that already exist are skipped, so only the missing ones are created.

Next steps