Skip to content

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 INSERT statements, understand data types, and handle dialect-specific syntax like string escaping and date formats.

Supported Dialects ​

Skifta currently supports three major SQL dialects:

PostgreSQL ​

toml
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 (COPY commands, :: 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 ​

toml
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 ​

toml
dialect = "sqlite"

Use when:

  • Working with SQLite databases (commonly used in mobile apps, embedded systems)
  • Dump files created with .dump command
  • 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:

toml
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:

DatabaseStatusNotes
MariaDB❌ Not supportedUse mysql dialect as workaround (may have limitations)
Oracle❌ Not supportedPlanned for future releases
SQL Server❌ Not supportedPlanned for future releases
Snowflake❌ Not supportedUnder 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:

bash
# 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=InnoDB

Mixed 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.

  • Configuration – Learn how to configure Skifta for your database
  • Quickstart – Get up and running with Skifta in 5 minutes
  • Transformers – Explore available data transformers