Pipeline · orders_postgres → iceberg_lake
Transforms
TRANSFORMvalidated
Definition · streamsyncs DSL
streamsyncs/v2deterministic
transform redact_pii {
fields_to_hash: [customer_email, customer_email_secondary]
fields_to_mask: [phone, ssn]
hash_algo: sha256
mask_char: "•"
preserve_length: true
on_missing: skip
on_error: route_to_dlq
output {
customer_email_hash = sha256(input.customer_email)
phone = mask(input.phone, keep_last=4)
ssn = mask(input.ssn, keep_last=0)
_redacted_at = now()
}
}Sample input · 1 row
{
"order_id": 4480921,
"customer_email": "alex.kim@example.com",
"phone": "+14155550199",
"ssn": "123-45-6789"
}Sample output · after transform
{
"order_id": 4480921,
"customer_email_hash": "a1f3...c8e9",
"phone": "•••••••0199",
"ssn": "•••••••••",
"_redacted_at": "2026-05-02T11:42:08Z"
}