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.

22.7 KB
Raw Blame
<functions>
    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel</name>
        <return_type>Array(Tuple(Int8, Nullable(String), Array(Float64), Array(Array(UUID)), UInt32))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(Nullable(String))</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Int8)</type>
            <name>optional_steps</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>RowBinaryWithNamesAndTypes</format>
        <send_chunk_header>true</send_chunk_header>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel steps --variant=plain</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_cohort</name>
        <return_type>Array(Tuple(Int8, UInt64, Array(Float64), Array(Array(UUID)), UInt32))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(UInt64)</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Int8)</type>
            <name>optional_steps</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UUID, UInt64, Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>RowBinaryWithNamesAndTypes</format>
        <send_chunk_header>true</send_chunk_header>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel steps --variant=cohort</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_array</name>
        <return_type>Array(Tuple(Int8, Array(String), Array(Float64), Array(Array(UUID)), UInt32))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(Array(String))</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Int8)</type>
            <name>optional_steps</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UUID, Array(String), Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>RowBinaryWithNamesAndTypes</format>
        <send_chunk_header>true</send_chunk_header>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel steps --variant=array</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_trends</name>
        <return_type>Array(Tuple(UInt64, Int8, Nullable(String), UUID))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>from_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>to_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(Nullable(String))</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UInt64, UUID, Nullable(String), Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>RowBinaryWithNamesAndTypes</format>
        <send_chunk_header>true</send_chunk_header>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel trends --variant=plain</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_array_trends</name>
        <return_type>Array(Tuple(UInt64, Int8, Array(String), UUID))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>from_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>to_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(Array(String))</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UInt64, UUID, Array(String), Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>RowBinaryWithNamesAndTypes</format>
        <send_chunk_header>true</send_chunk_header>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel trends --variant=array</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_cohort_trends</name>
        <return_type>Array(Tuple(UInt64, Int8, UInt64, UUID))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>from_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>to_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(UInt64)</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UInt64, UUID, UInt64, Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>RowBinaryWithNamesAndTypes</format>
        <send_chunk_header>true</send_chunk_header>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel trends --variant=cohort</command>
        <lifetime>600</lifetime>
    </function>

    <!--
      JSONEachRow mirrors, retained for manual benchmark comparison and for
      piping JSON fixtures at the binary during debugging.
    -->

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_json</name>
        <return_type>Array(Tuple(Int8, Nullable(String), Array(Float64), Array(Array(UUID)), UInt32))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(Nullable(String))</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Int8)</type>
            <name>optional_steps</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>JSONEachRow</format>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel steps --json --variant=plain</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_cohort_json</name>
        <return_type>Array(Tuple(Int8, UInt64, Array(Float64), Array(Array(UUID)), UInt32))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(UInt64)</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Int8)</type>
            <name>optional_steps</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UUID, UInt64, Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>JSONEachRow</format>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel steps --json --variant=cohort</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_array_json</name>
        <return_type>Array(Tuple(Int8, Array(String), Array(Float64), Array(Array(UUID)), UInt32))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(Array(String))</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Int8)</type>
            <name>optional_steps</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UUID, Array(String), Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>JSONEachRow</format>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel steps --json --variant=array</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_trends_json</name>
        <return_type>Array(Tuple(UInt64, Int8, Nullable(String), UUID))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>from_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>to_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(Nullable(String))</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UInt64, UUID, Nullable(String), Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>JSONEachRow</format>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel trends --json --variant=plain</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_array_trends_json</name>
        <return_type>Array(Tuple(UInt64, Int8, Array(String), UUID))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>from_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>to_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(Array(String))</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UInt64, UUID, Array(String), Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>JSONEachRow</format>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel trends --json --variant=array</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_cohort_trends_json</name>
        <return_type>Array(Tuple(UInt64, Int8, UInt64, UUID))</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>from_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>to_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(UInt64)</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UInt64, UUID, UInt64, Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>JSONEachRow</format>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel trends --json --variant=cohort</command>
        <lifetime>600</lifetime>
    </function>

    <!-- Python-script debug UDFs -->

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_test</name>
        <return_type>String</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(Array(String))</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Int8)</type>
            <name>optional_steps</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>JSONEachRow</format>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel_test.py</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable_pool</type>
        <name>aggregate_funnel_array_trends_test</name>
        <return_type>String</return_type>
        <return_name>result</return_name>
        <argument>
            <type>UInt8</type>
            <name>from_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>to_step</name>
        </argument>
        <argument>
            <type>UInt8</type>
            <name>num_steps</name>
        </argument>
        <argument>
            <type>UInt64</type>
            <name>conversion_window_limit</name>
        </argument>
        <argument>
            <type>String</type>
            <name>breakdown_attribution_type</name>
        </argument>
        <argument>
            <type>String</type>
            <name>funnel_order_type</name>
        </argument>
        <argument>
            <type>Array(Array(String))</type>
            <name>prop_vals</name>
        </argument>
        <argument>
            <type>Array(Tuple(Nullable(Float64), UInt64, UUID, Array(String), Array(Int8)))</type>
            <name>value</name>
        </argument>
        <format>JSONEachRow</format>
        <stderr_reaction>throw</stderr_reaction>
        <command>aggregate_funnel_array_trends_test.py</command>
        <lifetime>600</lifetime>
    </function>

    <function>
        <type>executable</type>
        <name>JSONDropKeys</name>
        <return_type>String</return_type>
        <argument>
            <type>String</type>
        </argument>
        <format>Raw</format>
        <command>json_drop_keys_udf {keys_parameter:Array(String)}</command>
    </function>

    <function>
        <type>executable_pool</type>
        <name>JSONCleanPostHogEvent</name>
        <return_type>Tuple(properties String, temporary_properties String, person_properties String, properties_null_keys Array(String), temporary_properties_null_keys Array(String), person_properties_null_keys Array(String))</return_type>
        <argument>
            <type>String</type>
            <name>properties</name>
        </argument>
        <argument>
            <type>String</type>
            <name>person_properties</name>
        </argument>
        <format>JSONEachRow</format>
        <command>json_clean_posthog_event_properties_udf --chunked --event</command>
        <send_chunk_header>true</send_chunk_header>
    </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>
    <function>
        <type>executable_pool</type>
        <name>decompress</name>
        <return_type>String</return_type>
        <argument>
            <type>String</type>
        </argument>
        <argument>
            <type>String</type>
        </argument>
        <format>RowBinary</format>
        <command>decompress_udf</command>
        <send_chunk_header>true</send_chunk_header>
        <stderr_reaction>throw</stderr_reaction>
        <deterministic>true</deterministic>
    </function>

    <function>
        <type>executable_pool</type>
        <name>JSONDropKeysPool</name>
        <return_type>String</return_type>
        <argument>
            <type>String</type>
            <name>json</name>
        </argument>
        <argument>
            <type>Array(String)</type>
            <name>keys</name>
        </argument>
        <format>RowBinary</format>
        <command>json_drop_keys_udf --row-binary</command>
        <send_chunk_header>true</send_chunk_header>
        <stderr_reaction>throw</stderr_reaction>
        <deterministic>true</deterministic>
    </function>
</functions>