Import a schema
Supported import file formats
A script import takes one file or one pasted script. This page lists what Kenseme accepts and what it looks for inside.
In the app: Data Model › Schemas › your schema › Info tab › Import Database Objects From Script
File types¶
| Extension | Format | Typical source |
|---|---|---|
.sql |
DDL script | SQL Server, PostgreSQL or MySQL exports, SSMS scripts, pg_dump output |
.yaml, .yml |
YAML | Schema-as-code tools and exports |
.json |
JSON | Programmatic exports, API responses |
.txt |
Plain text | Free-form schema descriptions, mixed content |
Any other extension is rejected with a message like Unsupported file type '.docx'. Please upload a SQL, YAML, JSON, or TXT file.
You can also choose Paste script and paste the text directly. Surrounding text is fine: comments, notes, markdown code fences, even an email thread. Kenseme finds the CREATE statements inside it.
Size limit¶
- The maximum is 5 MB, for files and pasted scripts alike.
- A file over the limit is refused before upload:
File is too large (5.2 MB). Maximum file size is 5MB. - To import more, split the export and import each part into the same schema in turn. Objects that already exist are skipped, so overlapping parts are safe.
Tip: An export for one schema is usually well under 5 MB. If yours is larger, check whether you exported a whole database when you only needed one schema.
What Kenseme reads inside the script¶
CREATE TABLEstatements, separated byGOor semicolons.CREATE INDEX,ALTER TABLE … ADD CONSTRAINT … FOREIGN KEY …, and keys declared inline.CREATE VIEW,CREATE PROCEDUREandCREATE FUNCTION. Their SQL is kept as written.- Value lists that become enums:
CHECK (col IN (…)), PostgreSQLCREATE TYPE … AS ENUM, MySQLENUM(…). - Description statements:
sp_addextendedproperty,COMMENT ON …, and the Snowflake and Databricks comment forms. These are applied in the descriptions stage. - Comments, SSMS preambles and
SETstatements are tolerated and cleaned out.
Note: The script doesn’t have to match the schema’s dialect exactly. A file with a mix of SQL Server and PostgreSQL habits usually imports fine. The objects are stored against the schema’s dialect (
Settings›Default Database Dialect).
Not supported¶
- ZIP or other archives. Extract first.
- More than one file per import. Run one import per file.
To import straight from a live database instead of a file, see Import objects from a database connection.