Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(clickhouse): add temporary event properties cleaner (#95891)

Rory Shanks894d1866e360
diff --git a/clickhouse-udfs/util/README.md b/clickhouse-udfs/util/README.md
index e7499bb619ed..20d3bac055f8 100644
--- a/clickhouse-udfs/util/README.md
+++ b/clickhouse-udfs/util/README.md
@@ -5,6 +5,7 @@ This module contains the executable ClickHouse UDFs used by PostHog:
- `JSONDropKeys`
- `JSONCleanPostHogEventProperties`
- `JSONCleanPostHogPersonProperties`
+- `JSONCleanPostHogTemporaryProperties`
- `JSONStripEmptyStringsAndNulls`
Run `./scripts/build.sh` to test the module and build Linux amd64 and arm64 binaries into
diff --git a/clickhouse-udfs/util/cmd/json_clean_posthog_event_properties_udf/main.go b/clickhouse-udfs/util/cmd/json_clean_posthog_event_properties_udf/main.go
index db5953feb29b..e6573059649f 100644
--- a/clickhouse-udfs/util/cmd/json_clean_posthog_event_properties_udf/main.go
+++ b/clickhouse-udfs/util/cmd/json_clean_posthog_event_properties_udf/main.go
@@ -27,6 +27,7 @@ type propertiesKind byte
const (
eventProperties propertiesKind = iota
personProperties
+ temporaryProperties
)
type pathRule struct {
@@ -52,7 +53,6 @@ var droppedEventPropertyKeys = map[string]struct{}{
"$ai_output_state": {},
"$ai_tools": {},
"ph_product_tours": {},
- "$session_recording_remote_config": {},
"$product_tours_activated": {},
"$product_tours_enabled_server_side": {},
"$surveys_activated": {},
@@ -61,14 +61,24 @@ var droppedEventPropertyKeys = map[string]struct{}{
"$feature_flag_bootstrapped_payload": {},
"$feature_flag_original_payload": {},
"$feature_flag_payloads": {},
- "$set": {},
- "$set_once": {},
- "$unset": {},
"$transformations_succeeded": {},
"$transformations_skipped": {},
unparseablePropertiesKey: {},
}
+func isTemporaryProperty(key string) bool {
+ root, _, _ := strings.Cut(key, ".")
+ switch root {
+ case "$set", "$set_once", "$unset", "$group_set", "$feature_flag_request_id",
+ "$debug_first_full_snapshot_timestamp", "$snapshot_max_depth_exceeded",
+ "$sess_rec_flush_size", "$session_recording_remote_config",
+ "$session_recording_network_payload_capture", "$session_recording_canvas_recording",
+ "$replay_script_config", "$sent_at", "$lib_rate_limit_remaining_tokens", "$lib_custom_api_host":
+ return true
+ }
+ return strings.HasPrefix(root, "$sdk_debug_")
+}
+
func makePathRules(paths ...string) *pathRule {
root := &pathRule{children: make(map[string]*pathRule, len(paths))}
addPathRules(root, normalizationStringArray, paths...)
@@ -172,7 +182,7 @@ func (p *processor) processLine(rawLine []byte, buf *bytes.Buffer) error {
parsed, err := p.parseValue()
if err != nil {
if errors.Is(err, errMaxJSONDepth) {
- writeUnparseableProperties(buf, rawLine)
+ p.writeUnparseableProperties(buf, rawLine)
return nil
}
return fmt.Errorf("json parse error: %w", err)
@@ -187,7 +197,7 @@ func (p *processor) processLine(rawLine []byte, buf *bytes.Buffer) error {
if err != nil {
p.recycle(parsed)
if errors.Is(err, errMaxJSONDepth) {
- writeUnparseableProperties(buf, rawLine)
+ p.writeUnparseableProperties(buf, rawLine)
return nil
}
return fmt.Errorf("json clean error: %w", err)
@@ -205,12 +215,33 @@ func (p *processor) processLine(rawLine []byte, buf *bytes.Buffer) error {
}
func (p *processor) cleanProperties(v *value) (*value, error) {
+ if p.kind == temporaryProperties {
+ return p.cleanTemporaryProperties(v)
+ }
if p.kind == personProperties {
return p.cleanNode(nil, v)
}
return p.cleanEventProperties(v)
}
+func (p *processor) cleanTemporaryProperties(v *value) (*value, error) {
+ if v.kind != kindObject {
+ return nil, fmt.Errorf("temporary properties must be a JSON object")
+ }
+ writeIdx := 0
+ for _, property := range v.entries {
+ if !isTemporaryProperty(property.key) {
+ p.mutated = true
+ p.recycle(property.value)
+ continue
+ }
+ v.entries[writeIdx] = property
+ writeIdx++
+ }
+ v.entries = v.entries[:writeIdx]
+ return p.cleanNode(nil, v)
+}
+
func (p *processor) cleanEventProperties(v *value) (*value, error) {
if v.kind != kindObject {
return p.cleanNode(eventPropertyRules, v)
@@ -233,7 +264,7 @@ func (p *processor) cleanEventProperties(v *value) (*value, error) {
writeIdx := 0
for _, property := range v.entries {
_, drop := droppedEventPropertyKeys[property.key]
- if drop || hasFeatureProperties && property.key == "$feature_flags" && property.value != featureFlags {
+ if drop || isTemporaryProperty(property.key) || hasFeatureProperties && property.key == "$feature_flags" && property.value != featureFlags {
p.mutated = true
p.recycle(property.value)
continue
@@ -758,8 +789,13 @@ func (p *processor) leaveJSONDepth() {
p.depth--
}
-func writeUnparseableProperties(buf *bytes.Buffer, raw []byte) {
+func (p *processor) writeUnparseableProperties(buf *bytes.Buffer, raw []byte) {
buf.Reset()
+ if p.kind == temporaryProperties {
+ // The permanent cleaner quarantines the raw document; do not duplicate it outside the allowlist.
+ buf.WriteString("{}")
+ return
+ }
buf.Grow(len(raw) + len(unparseablePropertiesKey) + 8)
buf.WriteByte('{')
writeJSONString(buf, unparseablePropertiesKey)
@@ -1291,7 +1327,12 @@ func main() {
cpuProfile := flag.String("cpuprofile", "", "write CPU profile to file")
chunked := flag.Bool("chunked", false, "read a row-count header before each input chunk")
cleanPersonProperties := flag.Bool("person-properties", false, "clean person properties without event-specific transformations")
+ cleanTemporaryProperties := flag.Bool("temporary-properties", false, "retain only temporary event properties")
flag.Parse()
+ if *cleanPersonProperties && *cleanTemporaryProperties {
+ fmt.Fprintln(os.Stderr, "person-properties and temporary-properties are mutually exclusive")
+ os.Exit(1)
+ }
if *cpuProfile != "" {
f, err := os.Create(*cpuProfile)
@@ -1318,6 +1359,9 @@ func main() {
if *cleanPersonProperties {
kind = personProperties
}
+ if *cleanTemporaryProperties {
+ kind = temporaryProperties
+ }
if err := runner(os.Stdin, os.Stdout, kind); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
diff --git a/clickhouse-udfs/util/cmd/json_clean_posthog_event_properties_udf/main_test.go b/clickhouse-udfs/util/cmd/json_clean_posthog_event_properties_udf/main_test.go
index 5bcc0ca55765..b6e92c3a67b9 100644
--- a/clickhouse-udfs/util/cmd/json_clean_posthog_event_properties_udf/main_test.go
+++ b/clickhouse-udfs/util/cmd/json_clean_posthog_event_properties_udf/main_test.go
@@ -147,6 +147,22 @@ func TestProcessLineQuarantinesExcessiveDepth(t *testing.T) {
}
}
+func TestTemporaryPropertiesDoNotDuplicateQuarantinedDocuments(t *testing.T) {
+ for _, input := range []string{
+ `{"$set":` + strings.Repeat(`{"x":`, maxJSONDepth) + `1` + strings.Repeat(`}`, maxJSONDepth) + `}`,
+ `{"$set.` + strings.Repeat("x.", maxJSONDepth) + `x":1}`,
+ } {
+ proc := processor{kind: temporaryProperties}
+ var got bytes.Buffer
+ if err := proc.processLine([]byte(input), &got); err != nil {
+ t.Fatal(err)
+ }
+ if got.String() != "{}" {
+ t.Fatalf("temporary output must not retain raw quarantine: %s", got.String())
+ }
+ }
+}
+
func TestProcessLineParsesStringifiedArrayPath(t *testing.T) {
input := []byte(`{"$exception_types":"[\"TypeError\",7,null,{\"x.y\":\"z\"}]"}`)
want := `{"$exception_types":["TypeError","7","","{\"x\":{\"y\":\"z\"}}"]}`
@@ -335,3 +351,54 @@ func generatedBenchmarkLines() ([][]byte, int) {
}
return lines, totalBytes
}
+
+func TestProcessLineSplitsTemporaryProperties(t *testing.T) {
+ tests := []struct {
+ name, input, permanent, temporary string
+ }{
+ {
+ name: "allowlist",
+ input: `{"$set":{"score":7,"enabled":false},"$set_once":{"source":"demo"},"$unset":["old"],"$group_set":{"tier":"basic"},"$feature_flag_request_id":"request-example","$debug_first_full_snapshot_timestamp":1,"$snapshot_max_depth_exceeded":true,"$sess_rec_flush_size":2,"$session_recording_remote_config":{"enabled":true},"$session_recording_network_payload_capture":false,"$session_recording_canvas_recording":true,"$replay_script_config":{"version":3},"$sent_at":"2026-01-01","$lib_rate_limit_remaining_tokens":0,"$lib_custom_api_host":"https://example.com","$sdk_debug_new_metric":[[1,"x"],null],"$sdk_debug_current_session_duration":42,"$debug_images":[{"type":"elf"}],"$feature/demo":"control","$active_feature_flags":["demo"],"$feature_flag_payload":{},"$feature_flag_payloads":{},"$feature_flag_bootstrapped_payload":{},"$feature_flag_original_payload":{},"$transformations_succeeded":[],"custom":{"$set":"keep"}}`,
+ permanent: `{"$debug_images":[{"type":"elf"}],"custom":{"$set":"keep"},"$feature_flags":{"demo":"control"}}`,
+ temporary: `{"$set":{"score":7,"enabled":false},"$set_once":{"source":"demo"},"$unset":["old"],"$group_set":{"tier":"basic"},"$feature_flag_request_id":"request-example","$debug_first_full_snapshot_timestamp":1,"$snapshot_max_depth_exceeded":true,"$sess_rec_flush_size":2,"$session_recording_remote_config":{"enabled":true},"$session_recording_network_payload_capture":false,"$session_recording_canvas_recording":true,"$replay_script_config":{"version":3},"$sent_at":"2026-01-01","$lib_rate_limit_remaining_tokens":0,"$lib_custom_api_host":"https://example.com","$sdk_debug_new_metric":[[1,"x"],null],"$sdk_debug_current_session_duration":42}`,
+ },
+ {
+ name: "dotted roots and normalization",
+ input: `{"$set.profile.score":7,"$set.profile.missing":null,"$sdk_debug_probe.a":1,"$sdk_debug_probe.a":2,"$sdk_debug_probe.large":18446744073709551616,"$sdk_debug_current_session_duration.value":42,"$set_extra":true,"$debug_custom":"keep","custom.$set":"keep"}`,
+ permanent: `{"$set_extra":true,"$debug_custom":"keep","custom":{"$set":"keep"}}`,
+ temporary: `{"$set":{"profile":{"score":7}},"$sdk_debug_probe":{"a":1,"large":"18446744073709551616"},"$sdk_debug_current_session_duration":{"value":42}}`,
+ },
+ {
+ name: "nothing temporary", input: `{"custom":true}`, permanent: `{"custom":true}`, temporary: `{}`,
+ },
+ {
+ name: "already separated", input: `{"$set":{"enabled":false},"$unset":[]}`, permanent: `{}`, temporary: `{"$set":{"enabled":false},"$unset":[]}`,
+ },
+ }
+ for _, kind := range []propertiesKind{eventProperties, temporaryProperties} {
+ temporaryOnly := kind == temporaryProperties
+ proc := processor{kind: kind}
+ var got bytes.Buffer
+ for _, tt := range tests {
+ t.Run(fmt.Sprintf("%s/temporary=%t", tt.name, temporaryOnly), func(t *testing.T) {
+ want := tt.permanent
+ if temporaryOnly {
+ want = tt.temporary
+ }
+ if err := proc.processLine([]byte(tt.input), &got); err != nil {
+ t.Fatal(err)
+ }
+ if got.String() != want {
+ t.Fatalf("got %s, want %s", got.String(), want)
+ }
+ })
+ }
+ }
+ for _, input := range []string{`{"broken"`, `[]`, `null`, `"text"`} {
+ proc := processor{kind: temporaryProperties}
+ var got bytes.Buffer
+ if err := proc.processLine([]byte(input), &got); err == nil {
+ t.Fatalf("expected error for temporary properties %s", input)
+ }
+ }
+}
diff --git a/clickhouse-udfs/util/scripts/integration_test.sh b/clickhouse-udfs/util/scripts/integration_test.sh
index bae2949deb69..160941a79a29 100755
--- a/clickhouse-udfs/util/scripts/integration_test.sh
+++ b/clickhouse-udfs/util/scripts/integration_test.sh
@@ -8,6 +8,7 @@ UDFS=(
json_drop_keys
json_clean_posthog_event_properties
json_clean_posthog_person_properties
+ json_clean_posthog_temporary_properties
json_strip_empty_strings_and_nulls
)
@@ -29,6 +30,9 @@ query_for() {
json_clean_posthog_person_properties)
echo "SELECT JSONCleanPostHogPersonProperties(x) FROM $input FORMAT TabSeparated"
;;
+ json_clean_posthog_temporary_properties)
+ echo "SELECT JSONCleanPostHogTemporaryProperties(x) FROM $input FORMAT TabSeparated"
+ ;;
json_strip_empty_strings_and_nulls)
echo "SELECT JSONStripEmptyStringsAndNulls(x) FROM $input FORMAT TabSeparated"
;;
diff --git a/clickhouse-udfs/util/testdata/json_clean_posthog_event_properties/stateless/clean_event_properties.reference b/clickhouse-udfs/util/testdata/json_clean_posthog_event_properties/stateless/clean_event_properties.reference
index 125f40c24cfd..9de7b6f7502b 100644
--- a/clickhouse-udfs/util/testdata/json_clean_posthog_event_properties/stateless/clean_event_properties.reference
+++ b/clickhouse-udfs/util/testdata/json_clean_posthog_event_properties/stateless/clean_event_properties.reference
@@ -1 +1,2 @@
{"$agent_turn":"3.0","$ai_total_cost_usd":"1.5","$is_identified":"true","$mcp_listed_tool_names":["search"],"$exception_list":[{"type":"TypeError"}],"Account":{"client_id":"abc"},"huge":"18446744073709551616","max_uint":18446744073709551615,"dupe":"kept","$feature_flags":{"beta":"control"}}
+{"$debug_images":[{"type":"elf"}],"custom":true}
diff --git a/clickhouse-udfs/util/testdata/json_clean_posthog_event_properties/stateless/clean_event_properties.tsv b/clickhouse-udfs/util/testdata/json_clean_posthog_event_properties/stateless/clean_event_properties.tsv
index 3df51e89b50e..fbc40a11da8f 100644
--- a/clickhouse-udfs/util/testdata/json_clean_posthog_event_properties/stateless/clean_event_properties.tsv
+++ b/clickhouse-udfs/util/testdata/json_clean_posthog_event_properties/stateless/clean_event_properties.tsv
@@ -1 +1,2 @@
{"$active_feature_flags":"undefined","$active_feature_flags":["beta",42,null,{"a.b":1}],"$feature/beta":"control","$ai_input":"secret","$set":{"name":"value"},"$set_once":{"initial":"value"},"$unset":["old_property"],"$agent_turn":"3.0","$ai_total_cost_usd":"1.5","$is_identified":"true","$mcp_listed_tool_names":"search","$exception_list":{"type":"TypeError","value":null},"Account.client_id":"abc","Account":{"client_id":null},"huge":18446744073709551616,"max_uint":18446744073709551615,"null_field":null,"dupe":"","dupe":"kept"}
+{"$set.profile.score":7,"$group_set":{"tier":"basic"},"$sdk_debug_probe.count":2,"$sdk_debug_current_session_duration":42,"$feature_flag_request_id":"request-example","$debug_images":[{"type":"elf"}],"custom":true}
diff --git a/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/README.md b/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/README.md
new file mode 100644
index 000000000000..da95f30a2aea
--- /dev/null
+++ b/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/README.md
@@ -0,0 +1,3 @@
+# JSONCleanPostHogTemporaryProperties Stateless Fixtures
+
+These cases exercise the shared executable's temporary mode through ClickHouse: allowlisted objects and arrays survive, dotted keys expand, analytical and payload fields are excluded, and non-object input fails.
diff --git a/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/clean_temporary_properties.reference b/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/clean_temporary_properties.reference
new file mode 100644
index 000000000000..b574923092bf
--- /dev/null
+++ b/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/clean_temporary_properties.reference
@@ -0,0 +1,3 @@
+{"$set":{"score":7,"enabled":false},"$unset":["old"],"$sdk_debug_probe":{"count":2},"$sdk_debug_current_session_duration":42,"$feature_flag_request_id":"request-example"}
+{}
+{"$set":{"enabled":false},"$unset":[]}
diff --git a/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/clean_temporary_properties.tsv b/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/clean_temporary_properties.tsv
new file mode 100644
index 000000000000..d0a961280b96
--- /dev/null
+++ b/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/clean_temporary_properties.tsv
@@ -0,0 +1,3 @@
+{"$set":{"score":7,"enabled":false},"$unset":["old"],"$sdk_debug_probe.count":2,"$sdk_debug_current_session_duration":42,"$feature_flag_request_id":"request-example","$debug_images":[{"type":"elf"}],"$feature/demo":"control","$feature_flag_payload":{},"custom":true}
+{"custom":true}
+{"$set":{"enabled":false},"$unset":[]}
diff --git a/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/non_object.fail.reference b/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/non_object.fail.reference
new file mode 100644
index 000000000000..3c4b445f4df8
--- /dev/null
+++ b/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/non_object.fail.reference
@@ -0,0 +1 @@
+temporary properties must be a JSON object
diff --git a/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/non_object.fail.tsv b/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/non_object.fail.tsv
new file mode 100644
index 000000000000..fe51488c7066
--- /dev/null
+++ b/clickhouse-udfs/util/testdata/json_clean_posthog_temporary_properties/stateless/non_object.fail.tsv
@@ -0,0 +1 @@
+[]
diff --git a/docker/clickhouse/user_defined_function.xml b/docker/clickhouse/user_defined_function.xml
index f651cff9d30c..194671c40784 100644
--- a/docker/clickhouse/user_defined_function.xml
+++ b/docker/clickhouse/user_defined_function.xml
@@ -621,6 +621,18 @@
<send_chunk_header>true</send_chunk_header>
</function>
+ <function>
+ <type>executable_pool</type>
+ <name>JSONCleanPostHogTemporaryProperties</name>
+ <return_type>String</return_type>
+ <argument>
+ <type>String</type>
+ </argument>
+ <format>Raw</format>
+ <command>json_clean_posthog_event_properties_udf --chunked --temporary-properties</command>
+ <send_chunk_header>true</send_chunk_header>
+ </function>
+
<function>
<type>executable_pool</type>
<name>JSONStripEmptyStringsAndNulls</name>
diff --git a/docs/internal/clickhouse-utility-udfs.md b/docs/internal/clickhouse-utility-udfs.md
index 47fb58e0766e..efba8425be65 100644
--- a/docs/internal/clickhouse-utility-udfs.md
+++ b/docs/internal/clickhouse-utility-udfs.md
@@ -6,3 +6,33 @@ This also applies to existing `$feature_flags` objects, after cleanup resolves d
Flag values and person-property ordering follow the existing cleanup rules.
See [the utility UDF README](../../clickhouse-udfs/util/README.md) for build and integration-test commands.
+
+### `JSONCleanPostHogTemporaryProperties(json)`
+
+Accepts a JSON object and retains only the following top-level properties, including their dotted descendants. It uses the event cleaner's dotted-key expansion, null-object-field removal, duplicate handling, and integer protection, without coercing values to declared schema types. Non-object input fails.
+
+| Category | Allowlist |
+| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
+| Person and group instructions | `$set`, `$set_once`, `$unset`, `$group_set` |
+| SDK diagnostics | Every `$sdk_debug_*` property, including session duration |
+| Flag diagnostics | `$feature_flag_request_id` |
+| Replay diagnostics | `$debug_first_full_snapshot_timestamp`, `$snapshot_max_depth_exceeded`, `$sess_rec_flush_size` |
+| Replay configuration | `$session_recording_remote_config`, `$session_recording_network_payload_capture`, `$session_recording_canvas_recording`, `$replay_script_config` |
+| Transport diagnostics | `$sent_at`, `$lib_rate_limit_remaining_tokens`, `$lib_custom_api_host` |
+
+`$feature_flag_request_id` moves to temporary properties on every event type. `$debug_images` remains in permanent properties. Feature-flag payloads and `$active_feature_flags` are excluded from both outputs. Matching applies only at the root: a custom object's nested `$set` is not a temporary property.
+
+Run both cleaners on the original JSON; the event cleaner has already discarded the temporary properties. Apply person/group instructions before splitting stored event properties. Retention belongs to the destination column's TTL and insertion time; this function does not expire data itself.
+
+```sql
+WITH '{"$set":{"score":7},"$sdk_debug_probe":true,"$sdk_debug_current_session_duration":42,"$feature_flag_request_id":"request-example","custom":"kept"}' AS raw_properties
+SELECT
+ JSONCleanPostHogEventProperties(raw_properties) AS properties,
+ JSONCleanPostHogTemporaryProperties(raw_properties) AS temporary_properties;
+-- properties: {"custom":"kept"}
+-- temporary_properties: {"$set":{"score":7},"$sdk_debug_probe":true,"$sdk_debug_current_session_duration":42,"$feature_flag_request_id":"request-example"}
+```
+
+Both functions use the same executable. The temporary entry point uses `--temporary-properties` with the existing chunk protocol.
+
+Documents exceeding the shared depth limit produce `{}` in the temporary output; the permanent cleaner quarantines the original document.
diff --git a/posthog/udf_versioner.py b/posthog/udf_versioner.py
index 30decae8e9f9..3d7fe6fd8ee4 100644
--- a/posthog/udf_versioner.py
+++ b/posthog/udf_versioner.py
@@ -17,6 +17,7 @@ EARLIEST_UDF_VERSION = 11
UNVERSIONED_FUNCTIONS = {
"JSONCleanPostHogEventProperties",
"JSONCleanPostHogPersonProperties",
+ "JSONCleanPostHogTemporaryProperties",
"JSONStripEmptyStringsAndNulls",
}
diff --git a/posthog/user_scripts/json_clean_posthog_event_properties_udf_aarch64 b/posthog/user_scripts/json_clean_posthog_event_properties_udf_aarch64
index ea567bf6da9f..68a0cdb10842 100755
Binary files a/posthog/user_scripts/json_clean_posthog_event_properties_udf_aarch64 and b/posthog/user_scripts/json_clean_posthog_event_properties_udf_aarch64 differ
diff --git a/posthog/user_scripts/json_clean_posthog_event_properties_udf_x86_64 b/posthog/user_scripts/json_clean_posthog_event_properties_udf_x86_64
index 818132d8c2a2..a31aa371d252 100755
Binary files a/posthog/user_scripts/json_clean_posthog_event_properties_udf_x86_64 and b/posthog/user_scripts/json_clean_posthog_event_properties_udf_x86_64 differ
diff --git a/posthog/user_scripts/latest_user_defined_function.xml b/posthog/user_scripts/latest_user_defined_function.xml
index 2f95af231174..d0e39c449745 100644
--- a/posthog/user_scripts/latest_user_defined_function.xml
+++ b/posthog/user_scripts/latest_user_defined_function.xml
@@ -1,5 +1,5 @@
<functions>
- <!-- Version: v12. Generated at: 2026-09-01T08:45:22.183570+00:00
+ <!-- Version: v12. Generated at: 2026-09-07T07:48:54.700356+00:00
This file is autogenerated by udf_versioner.py. Do not edit this, only edit the version at docker/clickhouse/user_defined_function.xml--><function>
<type>executable_pool</type>
<name>aggregate_funnel_v11</name>
@@ -940,6 +940,18 @@ This file is autogenerated by udf_versioner.py. Do not edit this, only edit the
<send_chunk_header>true</send_chunk_header>
</function>
+ <function>
+ <type>executable_pool</type>
+ <name>JSONCleanPostHogTemporaryProperties</name>
+ <return_type>String</return_type>
+ <argument>
+ <type>String</type>
+ </argument>
+ <format>Raw</format>
+ <command>json_clean_posthog_event_properties_udf --chunked --temporary-properties</command>
+ <send_chunk_header>true</send_chunk_header>
+ </function>
+
<function>
<type>executable_pool</type>
<name>JSONStripEmptyStringsAndNulls</name>
@@ -951,4 +963,4 @@ This file is autogenerated by udf_versioner.py. Do not edit this, only edit the
<command>json_strip_empty_strings_and_nulls_udf --chunked</command>
<send_chunk_header>true</send_chunk_header>
</function>
-</functions>
+</functions>
\ No newline at end of file
diff --git a/posthog/user_scripts/v12/user_defined_function.xml b/posthog/user_scripts/v12/user_defined_function.xml
index 9d3e01189664..d0e39c449745 100644
--- a/posthog/user_scripts/v12/user_defined_function.xml
+++ b/posthog/user_scripts/v12/user_defined_function.xml
@@ -1,5 +1,5 @@
<functions>
- <!-- Version: v12. Generated at: 2026-04-23T05:29:22.648565+00:00
+ <!-- Version: v12. Generated at: 2026-09-07T07:48:54.700356+00:00
This file is autogenerated by udf_versioner.py. Do not edit this, only edit the version at docker/clickhouse/user_defined_function.xml--><function>
<type>executable_pool</type>
<name>aggregate_funnel_v11</name>
@@ -915,4 +915,52 @@ This file is autogenerated by udf_versioner.py. Do not edit this, only edit the
<format>Raw</format>
<command>v12/json_drop_keys_udf {keys_parameter:Array(String)}</command>
</function>
+
+ <function>
+ <type>executable_pool</type>
+ <name>JSONCleanPostHogEventProperties</name>
+ <return_type>String</return_type>
+ <argument>
+ <type>String</type>
+ </argument>
+ <format>Raw</format>
+ <command>json_clean_posthog_event_properties_udf --chunked</command>
+ <send_chunk_header>true</send_chunk_header>
+ </function>
+
+ <function>
+ <type>executable_pool</type>
+ <name>JSONCleanPostHogPersonProperties</name>
+ <return_type>String</return_type>
+ <argument>
+ <type>String</type>
+ </argument>
+ <format>Raw</format>
+ <command>json_clean_posthog_event_properties_udf --chunked --person-properties</command>
+ <send_chunk_header>true</send_chunk_header>
+ </function>
+
+ <function>
+ <type>executable_pool</type>
+ <name>JSONCleanPostHogTemporaryProperties</name>
+ <return_type>String</return_type>
+ <argument>
+ <type>String</type>
+ </argument>
+ <format>Raw</format>
+ <command>json_clean_posthog_event_properties_udf --chunked --temporary-properties</command>
+ <send_chunk_header>true</send_chunk_header>
+ </function>
+
+ <function>
+ <type>executable_pool</type>
+ <name>JSONStripEmptyStringsAndNulls</name>
+ <return_type>String</return_type>
+ <argument>
+ <type>String</type>
+ </argument>
+ <format>Raw</format>
+ <command>json_strip_empty_strings_and_nulls_udf --chunked</command>
+ <send_chunk_header>true</send_chunk_header>
+ </function>
</functions>
\ No newline at end of file