Let customers transform their data with code.
Riza powers data transformation for your customers
with an in-process, fully-sandboxed runtime.
{
"name": "Amelia Johnson",
"birthday": "1988-05-18",
"country": "US",
"phone": "(555) 123-4567"
}1from datetime import datetime
2
3def transform(name, birthday, country, phone):
4 if country != "US":
5 name = ""
6 dt = datetime.strptime(birthday, "%Y-%m-%d")
7 return {
8 "name": name,
9 "phone_last4": phone[-4:],
10 "birth_year": dt.year,
11 }
12{
"name": "Amelia Johnson",
"birth_year": 1988,
"phone_last4": "4567",
}