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
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_addextendedpropertyorCOMMENT ON.
Note: A script import doesn’t write descriptions of its own. Objects without a description statement in the script have none. Use
Generate Descriptionsto 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
Relationshipstab and confirm the child tables appear underRelationships To This Table.Suggest Relationshipson theInfotab can find ones the script didn’t declare. - Check enums. Open the
Enumstab and confirm each enum has the values you expect. - Check SQL objects. Look for red icons on the
Views,ProceduresandFunctionstabs; they mark objects with broken dependencies. Open one or two objects and check theirOutputandDependenciestabs. - 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 Dialecton theSettingstab, or clone the schema to the other dialect to get converted code. - Create a version. Once you’re happy, click
Create Versionon theInfotab 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¶
- Generate a script from a version to build the schema in a real database once you have a version.
- Define relationships and indexes to fill gaps.
- Pipelines overview to start moving data between schemas.