SemVer Flattener

SemVer Flattener

Splits semantic version strings in the chosen properties into separate major, minor, patch, pre-release and build properties.

Configuration

OptionDescription
Properties to flatten
Type: string
Required: True

Comma-separated list of properties holding semantic version strings (e.g. app_version, sdk_version).

Using our REST API you can create this transformation like so:

Terminal
# Create a new destination
curl --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": "SemVer Flattener",
"inputs": {
"properties": {
"value": ""
}
},
"enabled": true,
"template_id": "template-semver-flattener"
}'