SQL Dialect Support β
Skifta needs to understand the specific SQL syntax used in your database dump files. Different database systems (PostgreSQL, MySQL, SQLite) have subtle syntax variationsβthese are called SQL dialects.
π§ Why it matters: The dialect setting tells Skifta how to correctly parse
INSERTstatements, understand data types, and handle dialect-specific syntax like string escaping and date formats.
Supported Dialects β
Skifta currently supports three major SQL dialects:
PostgreSQL β
dialect = "postgres"Use when:
- Working with PostgreSQL databases (versions 9.x through 16.x)
- Dump files created with
pg_dump - Your SQL contains PostgreSQL-specific syntax (
COPYcommands,::type casts, etc.)
Features:
- Full support for PostgreSQL INSERT syntax
- Handles array types, JSON columns, and custom types
- Preserves schema prefixes and quoted identifiers
MySQL β
dialect = "mysql"Use when:
- Working with MySQL or MariaDB databases
- Dump files created with
mysqldump - Your SQL uses backtick identifiers (`table_name`)
Features:
- Full support for MySQL INSERT syntax
- Handles extended INSERT statements (multiple rows per statement)
- Preserves MySQL-specific data types
SQLite β
dialect = "sqlite"Use when:
- Working with SQLite databases (commonly used in mobile apps, embedded systems)
- Dump files created with
.dumpcommand - Simpler SQL syntax without advanced features
Features:
- Full support for SQLite INSERT syntax
- Handles SQLite's flexible typing system
- Preserves SQLite-specific pragmas
Dialect Detection β
Skifta does not auto-detect dialects. You must specify the dialect in your skifta.toml configuration:
dialect = "postgres"Why no auto-detection?
- SQL dumps can contain ambiguous syntax
- Explicit configuration prevents parsing errors
- Ensures predictable, reliable transformations
Unsupported Dialects β
Need support for other databases? Here's the current status:
| Database | Status | Notes |
|---|---|---|
| MariaDB | β Not supported | Use mysql dialect as workaround (may have limitations) |
| Oracle | β Not supported | Planned for future releases |
| SQL Server | β Not supported | Planned for future releases |
| Snowflake | β Not supported | Under consideration |
π‘ Need a specific dialect? Open a feature request on GitHub. Community demand helps prioritize new dialect support.
Common Issues β
Wrong Dialect Configuration β
Problem: Skifta fails to parse or transform your SQL dump.
Solution: Verify your dialect matches your database:
# For PostgreSQL dumps
head -10 dump.sql
# Look for: COPY statements, CREATE TABLE syntax
# For MySQL dumps
head -10 dump.sql
# Look for: backticks (`), ENGINE=InnoDBMixed Dialect Dumps β
Problem: Your dump file contains SQL from multiple databases.
Solution: Skifta processes one dialect at a time. Split your dump into separate files or convert to a single dialect before processing.
Performance Notes β
Dialect parsing performance is optimized and should not be a bottleneck:
- PostgreSQL: Fast parsing, even for complex schemas
- MySQL: Efficient handling of extended INSERT statements
- SQLite: Lightweight and fast for smaller dumps
All dialects can process large dumps (4GB+) in seconds.
Related Guides β
- Configuration β Learn how to configure Skifta for your database
- Quickstart β Get up and running with Skifta in 5 minutes
- Transformers β Explore available data transformers