MariaDB 10.6+ · relational masking
Mask and subset MariaDB for staging and QA.
Subveil copies a foreign-key-connected subset of MariaDB into a separate target and masks configured values while copying. For example, seed a QA database with stores from one region and the related orders your tests need.
Source MariaDB
Selected source rows
subveil pull
Subset and configured masking
Target MariaDB
Separate database copy
Configuration
Select stores and mask delivery details.
MariaDB uses engine: mysql and accepts mysql:// connection URLs. Set both URLs and the masking seed in the runner environment. Adapt this example to your tables and verify that foreign keys connect the selected stores to their orders.
version: 1engine: mysqlsource: dsn_env: SUBVEIL_SOURCE_URLtarget: dsn_env: SUBVEIL_TARGET_URLmasking: seed_env: SUBVEIL_MASK_KEYsubset: roots: - table: stores where: "region = 'eu'"tables: orders: columns: shipping_address: transformer: address delivery_details: transformer: jsonb paths: - path: "$.recipient.phone" transformer: phoneThe jsonb transformer name also applies to MariaDB JSON. MariaDB represents JSON as text, so confirm which text columns contain structured data and explicitly configure the paths you need. This example masks the recipient phone while preserving the other JSON fields. Review those fields for PII before sharing the copy.
subveil plan --config subveil.yamlsubveil pull --config subveil.yamlsubveil verify --config subveil.yamlVerification
Check the MariaDB source and target.
- Use MariaDB 10.6+. The CLI repository records integration runs on 10.6, 10.11, and 11.4. Managed-provider configurations have yet to be independently tested.
- Use InnoDB tables for the source snapshot. Check the storage engine on older schemas before relying on transaction-level consistency.
- Use a separate MariaDB target with permissions to load rows. For an empty target, Subveil reads native table definitions with
SHOW CREATE TABLE. MariaDB DDL can implicitly commit, so created tables can remain after a failed load.
See the CLI quickstart for setup, How It Works for the copy workflow, Security for isolation guarantees, Why Switch for architecture comparisons, and the staging data checklist for reviewing the result. For a MySQL source, see MySQL data masking.
Multi-engine CLI
Other supported engines
Start with a local copy
Start with a smaller database copy.
Review the workflow and configure masking for your data.