diff --git a/posthog/user_scripts/v3/aggregate_funnel b/posthog/user_scripts/v3/aggregate_funnel new file mode 100755 index 0000000000000..e62dd751484cb --- /dev/null +++ b/posthog/user_scripts/v3/aggregate_funnel @@ -0,0 +1,9 @@ +#!/bin/sh + +DIR_NAME=$(dirname "$0") + +case $( uname -m ) in +aarch64) $DIR_NAME/aggregate_funnel_aarch64 "$@";; +*) $DIR_NAME/aggregate_funnel_x86_64 "$@";; +esac + diff --git a/posthog/user_scripts/v3/aggregate_funnel_aarch64 b/posthog/user_scripts/v3/aggregate_funnel_aarch64 new file mode 100755 index 0000000000000..6c490d2e58b86 Binary files /dev/null and b/posthog/user_scripts/v3/aggregate_funnel_aarch64 differ diff --git a/posthog/user_scripts/v3/aggregate_funnel_array_trends_test.py b/posthog/user_scripts/v3/aggregate_funnel_array_trends_test.py new file mode 100755 index 0000000000000..cf6ab4e33741b --- /dev/null +++ b/posthog/user_scripts/v3/aggregate_funnel_array_trends_test.py @@ -0,0 +1,13 @@ +#!/usr/bin/python3 + +import sys +import json + +if __name__ == "__main__": + for line in sys.stdin: + try: + print(json.dumps({"result": line})) # noqa: T201 + # calculate_funnel_trends_from_user_events(*parse_args(line)) + except Exception as e: + print(json.dumps({"result": json.dumps(str(e))}), end="\n") # noqa: T201 + sys.stdout.flush() diff --git a/posthog/user_scripts/v3/aggregate_funnel_test.py b/posthog/user_scripts/v3/aggregate_funnel_test.py new file mode 100755 index 0000000000000..1eae7c9f36914 --- /dev/null +++ b/posthog/user_scripts/v3/aggregate_funnel_test.py @@ -0,0 +1,14 @@ +#!/usr/bin/python3 +import json + +import sys +import traceback + +if __name__ == "__main__": + for line in sys.stdin: + try: + # calculate_funnel_from_user_events(*parse_args(line)) + print(json.dumps({"result": line})) # noqa: T201 + except Exception as e: + print(json.dumps({"result": json.dumps(str(e) + traceback.format_exc())}), end="\n") # noqa: T201 + sys.stdout.flush() diff --git a/posthog/user_scripts/v3/aggregate_funnel_x86_64 b/posthog/user_scripts/v3/aggregate_funnel_x86_64 new file mode 100755 index 0000000000000..9570bf6d55e29 Binary files /dev/null and b/posthog/user_scripts/v3/aggregate_funnel_x86_64 differ diff --git a/posthog/user_scripts/v3/user_defined_function.xml b/posthog/user_scripts/v3/user_defined_function.xml new file mode 100644 index 0000000000000..a7da950ae23e2 --- /dev/null +++ b/posthog/user_scripts/v3/user_defined_function.xml @@ -0,0 +1,589 @@ + + + executable_pool + aggregate_funnel_v2 + Array(Tuple(Int8, Nullable(String), Array(Float64), Array(Array(UUID)))) + result + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Nullable(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8))) + value + + JSONEachRow + v2/aggregate_funnel steps + 600 + + + + executable_pool + aggregate_funnel_cohort_v2 + Array(Tuple(Int8, UInt64, Array(Float64), Array(Array(UUID)))) + result + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(UInt64) + prop_vals + + + Array(Tuple(Nullable(Float64), UUID, UInt64, Array(Int8))) + value + + JSONEachRow + v2/aggregate_funnel steps + 600 + + + + executable_pool + aggregate_funnel_array_v2 + Array(Tuple(Int8, Array(String), Array(Float64), Array(Array(UUID)))) + result + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Array(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UUID, Array(String), Array(Int8))) + value + + JSONEachRow + v2/aggregate_funnel steps + 600 + + + + executable_pool + aggregate_funnel_test_v2 + String + result + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Array(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8))) + value + + JSONEachRow + v2/aggregate_funnel_test.py + 600 + + + + executable_pool + aggregate_funnel_trends_v2 + Array(Tuple(UInt64, Int8, Nullable(String), UUID)) + result + + UInt8 + from_step + + + UInt8 + num_steps + + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Nullable(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UInt64, UUID, Nullable(String), Array(Int8))) + value + + JSONEachRow + v2/aggregate_funnel trends + 600 + + + + executable_pool + aggregate_funnel_array_trends_v2 + + Array(Tuple(UInt64, Int8, Array(String), UUID)) + result + + UInt8 + from_step + + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Array(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UInt64, UUID, Array(String), Array(Int8))) + value + + JSONEachRow + v2/aggregate_funnel trends + 600 + + + + executable_pool + aggregate_funnel_cohort_trends_v2 + + Array(Tuple(UInt64, Int8, UInt64, UUID)) + result + + UInt8 + from_step + + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(UInt64) + prop_vals + + + Array(Tuple(Nullable(Float64), UInt64, UUID, UInt64, Array(Int8))) + value + + JSONEachRow + v2/aggregate_funnel trends + 600 + + + + executable_pool + aggregate_funnel_array_trends_test_v2 + String + result + + UInt8 + from_step + + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Array(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UInt64, UUID, Array(String), Array(Int8))) + value + + JSONEachRow + v2/aggregate_funnel_array_trends_test.py + 600 + + + executable_pool + aggregate_funnel_v3 + Array(Tuple(Int8, Nullable(String), Array(Float64), Array(Array(UUID)))) + result + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Nullable(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8))) + value + + JSONEachRow + v3/aggregate_funnel steps + 600 + + + + executable_pool + aggregate_funnel_cohort_v3 + Array(Tuple(Int8, UInt64, Array(Float64), Array(Array(UUID)))) + result + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(UInt64) + prop_vals + + + Array(Tuple(Nullable(Float64), UUID, UInt64, Array(Int8))) + value + + JSONEachRow + v3/aggregate_funnel steps + 600 + + + + executable_pool + aggregate_funnel_array_v3 + Array(Tuple(Int8, Array(String), Array(Float64), Array(Array(UUID)))) + result + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Array(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UUID, Array(String), Array(Int8))) + value + + JSONEachRow + v3/aggregate_funnel steps + 600 + + + + executable_pool + aggregate_funnel_test_v3 + String + result + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Array(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8))) + value + + JSONEachRow + v3/aggregate_funnel_test.py + 600 + + + + executable_pool + aggregate_funnel_trends_v3 + Array(Tuple(UInt64, Int8, Nullable(String), UUID)) + result + + UInt8 + from_step + + + UInt8 + num_steps + + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Nullable(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UInt64, UUID, Nullable(String), Array(Int8))) + value + + JSONEachRow + v3/aggregate_funnel trends + 600 + + + + executable_pool + aggregate_funnel_array_trends_v3 + + Array(Tuple(UInt64, Int8, Array(String), UUID)) + result + + UInt8 + from_step + + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Array(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UInt64, UUID, Array(String), Array(Int8))) + value + + JSONEachRow + v3/aggregate_funnel trends + 600 + + + + executable_pool + aggregate_funnel_cohort_trends_v3 + + Array(Tuple(UInt64, Int8, UInt64, UUID)) + result + + UInt8 + from_step + + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(UInt64) + prop_vals + + + Array(Tuple(Nullable(Float64), UInt64, UUID, UInt64, Array(Int8))) + value + + JSONEachRow + v3/aggregate_funnel trends + 600 + + + + executable_pool + aggregate_funnel_array_trends_test_v3 + String + result + + UInt8 + from_step + + + UInt8 + num_steps + + + UInt64 + conversion_window_limit + + + String + breakdown_attribution_type + + + String + funnel_order_type + + + Array(Array(String)) + prop_vals + + + Array(Tuple(Nullable(Float64), UInt64, UUID, Array(String), Array(Int8))) + value + + JSONEachRow + v3/aggregate_funnel_array_trends_test.py + 600 + + \ No newline at end of file