diff --git a/posthog/user_scripts/v2/aggregate_funnel b/posthog/user_scripts/v2/aggregate_funnel new file mode 100755 index 00000000000..e62dd751484 --- /dev/null +++ b/posthog/user_scripts/v2/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/v2/aggregate_funnel_aarch64 b/posthog/user_scripts/v2/aggregate_funnel_aarch64 new file mode 100755 index 00000000000..2cf3ee037fe Binary files /dev/null and b/posthog/user_scripts/v2/aggregate_funnel_aarch64 differ diff --git a/posthog/user_scripts/v2/aggregate_funnel_array_trends_test.py b/posthog/user_scripts/v2/aggregate_funnel_array_trends_test.py new file mode 100755 index 00000000000..cf6ab4e3374 --- /dev/null +++ b/posthog/user_scripts/v2/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/v2/aggregate_funnel_test.py b/posthog/user_scripts/v2/aggregate_funnel_test.py new file mode 100755 index 00000000000..1eae7c9f369 --- /dev/null +++ b/posthog/user_scripts/v2/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/v2/aggregate_funnel_x86_64 b/posthog/user_scripts/v2/aggregate_funnel_x86_64 new file mode 100755 index 00000000000..030bbc0a3fe Binary files /dev/null and b/posthog/user_scripts/v2/aggregate_funnel_x86_64 differ diff --git a/posthog/user_scripts/v2/user_defined_function.xml b/posthog/user_scripts/v2/user_defined_function.xml new file mode 100644 index 00000000000..c84d6f05a97 --- /dev/null +++ b/posthog/user_scripts/v2/user_defined_function.xml @@ -0,0 +1,589 @@ + + + executable_pool + aggregate_funnel_v1 + 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 + v1/aggregate_funnel steps + 600 + + + + executable_pool + aggregate_funnel_cohort_v1 + 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 + v1/aggregate_funnel steps + 600 + + + + executable_pool + aggregate_funnel_array_v1 + 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 + v1/aggregate_funnel steps + 600 + + + + executable_pool + aggregate_funnel_test_v1 + 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 + v1/aggregate_funnel_test.py + 600 + + + + executable_pool + aggregate_funnel_trends_v1 + Array(Tuple(UInt64, Int8, Nullable(String))) + 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, Nullable(String), Array(Int8))) + value + + JSONEachRow + v1/aggregate_funnel trends + 600 + + + + executable_pool + aggregate_funnel_array_trends_v1 + + Array(Tuple(UInt64, Int8, Array(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, Array(String), Array(Int8))) + value + + JSONEachRow + v1/aggregate_funnel trends + 600 + + + + executable_pool + aggregate_funnel_cohort_trends_v1 + + Array(Tuple(UInt64, Int8, UInt64)) + 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, UInt64, Array(Int8))) + value + + JSONEachRow + v1/aggregate_funnel trends + 600 + + + + executable_pool + aggregate_funnel_array_trends_test_v1 + 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, Array(String), Array(Int8))) + value + + JSONEachRow + v1/aggregate_funnel_array_trends_test.py + 600 + + + 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 + + \ No newline at end of file