Configuration β
Skifta uses a simple TOML configuration file to define how your SQL dumps should be transformed. The config file specifies:
- SQL dialect (PostgreSQL, MySQL, SQLite)
- Tables and columns to transform
- Transformers to apply for each column
- Transformation options (optional, per transformer)
π‘ New to Skifta? Start with the Installing and Quickstart guides.
Creating a Configuration File β
The easiest way to get started is to generate a starter config:
skifta initThis creates a skifta.toml file in your current directory with example configurations you can customize.
SQL Dialect β
Skifta supports several SQL dialects. Specify the one that matches your SQL dump:
dialect = "postgres"Supported dialects are listed in the Dialect guide.
Tables β
Define each target table using the [[table]] block:
[[table]]
name = "customers"Columns β
Inside each table, you define which columns to transform and which transformer to apply.
Nested Format β
[[table]]
name = "employees"
[[table.columns]]
name = "first_name"
transformer = "name"Inline Format β
If you prefer a compact style, use inline objects:
[[table]]
name = "employees"
columns = [
{ name = "first_name", transformer = "name" },
{ name = "email", transformer = "email" }
]Both styles are supported β pick whichever suits your workflow.
Transformers β
Transformers are reusable building blocks that control how values are modified or generated. You can specify them by name or provide an object for advanced options.
See the Transformers section for full details and examples.
Full Example β
Here's a complete skifta.toml example for an e-commerce database:
dialect = "postgres"
[[table]]
name = "customers"
columns = [
{ name = "email", transformer = "email" },
{ name = "first_name", transformer = "name" },
{ name = "last_name", transformer = "name" },
{ name = "phone", transformer = "phone-number" }
]
[[table]]
name = "orders"
columns = [
{ name = "shipping_address", transformer = "lipsum" },
{ name = "billing_address", transformer = "lipsum" }
]
[[table]]
name = "payments"
columns = [
{ name = "card_number", transformer = "credit-card" },
{ name = "cardholder_name", transformer = "name" }
]
[[table]]
name = "employees"
columns = [
{ name = "email", transformer = "email" },
{ name = "salary", transformer = { obfuscate = { preserve_length = true } } },
{ name = "ssn", transformer = { static = { value = "XXX-XX-XXXX" } } }
]This configuration will:
- Mask all customer PII (emails, names, phone numbers)
- Anonymize shipping and billing addresses
- Replace credit card numbers with valid-format test cards
- Obfuscate employee salaries while preserving length
- Replace SSNs with a static redacted value