Transformation Issues
Troubleshoot problems during data masking, generation, and subsetting.
Foreign Key Constraint Violations
Common Causes
-
Parent table processed after child
The platform should handle this automatically, but if you see this error:
# Ensure parent tables are listed first
table_schema:
- table_name_pattern: "customers" # Parent
- table_name_pattern: "orders" # Child
-
Missing foreign key metadata
Solution: Define virtual foreign keys:
foreign_keys:
- columns: ["customer_id"]
reference_table: "customers"
reference_columns: ["id"]
See: Virtual Foreign Keys
Type Conversion Errors
Solutions
-
Check transformer compatibility:
# ❌ Wrong: Email transformer on numeric column
- columns: ["customer_id"]
params:
type: person_generator
column_templates: ["${email}"]
# ✓ Correct: Use appropriate transformer
- columns: ["customer_id"]
params:
type: int_sequence_generator
-
Verify column data types:
-- Check actual data type
SELECT data_type
FROM information_schema.columns
WHERE table_name = 'customers'
AND column_name = 'email';
-
Use custom transformations:
NULL Value Handling
Solutions
-
Preserve NULLs from source:
The platform preserves NULL values by default.
-
Generate non-NULL values:
transformations:
- columns: ["email"]
params:
type: person_generator
column_templates: ["${email}"]
# Platform preserves NULLs by default; configure as needed
-
Check NOT NULL constraints:
-- Verify constraint
SELECT column_name, is_nullable
FROM information_schema.columns
WHERE table_name = 'customers';
Slow Transformation Performance
Solutions
-
Check database indexes:
-- Ensure foreign key columns are indexed
CREATE INDEX idx_customer_id ON orders(customer_id);
-
Optimize transformations:
-
Avoid complex scripting transformers when simple ones suffice
-
Use deterministic transformations when possible
-
-
Scale horizontally:
Add more agents: See Scaling Guide