This transformation removes null properties from the event properties object. If the object nesting exceeds 3 levels, deeper levels will be returned unchanged.
Using our REST API you can create this transformation like so:
Terminal
# Create a new destinationcurl --location 'https://us.i.posthog.com/api/environments/:project_id/hog_functions' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer <POSTHOG_PERSONAL_API_KEY>' \--data '{"type": "transformation","name": "Remove Null Properties","inputs": {},"enabled": true,"template_id": "template-remove-null-properties"}'