Schema Upload
Upload your database schema to LILA. LILA reads your table structures, column names, and relationships so it can translate natural language questions into accurate SQL queries. This page shows you how to upload or connect your schema.
Navigation: Dashboard → Projects → [Your Project] → Schema
Upload Methods
Provide your database structure to LILA in two ways.
Database Connection (Auto Mode)
Easiest method. Connect LILA directly to your database for automatic schema extraction.
- Click the database connection tab
- Enter your database credentials
- Click “Pull Schema” to retrieve structure automatically
- LILA analyzes tables, columns, and relationships
Security: LILA only reads your schema structure (table and column definitions). No actual data is accessed.
File Upload
Upload a SQL schema file exported from your database.
- Export your database schema to a
.sqlfile - Click the upload tab
- Select or drag your schema file
- Click “Generate Stats” to analyze the file
- LILA processes the SQL and extracts structure
Supported formats: PostgreSQL, MySQL, MariaDB, MSSQL, Oracle, SQLite
Schema Statistics
After uploading or connecting, you’ll see statistics about your schema:
- Total tables detected
- Table names and structures
- Relationships between tables
Excluding Tables
Hide sensitive tables from the AI by excluding them from queries:
- Review the detected tables in Schema Stats section
- Select tables you want to exclude
- Click “Update Schema” to save your selections
Example use case: Exclude internal tables like migrations, sessions, or logs that users shouldn’t query.
When to Update
Re-upload your schema whenever you:
- Add new tables to your database
- Change column names or types
- Add or remove relationships
- Need to update excluded tables list
The “Update Schema” button saves your table exclusion preferences without re-uploading.
Related Pages
- Database Connection - Configure database credentials
- Business Logic - Add custom query rules
- Playground - Test queries after upload