Skip to content

Commit

Permalink
rust funnel udfs
Browse files Browse the repository at this point in the history
  • Loading branch information
aspicer committed Oct 1, 2024
1 parent 3abc7a5 commit 97f6b2d
Show file tree
Hide file tree
Showing 39 changed files with 790 additions and 6,696 deletions.
2 changes: 1 addition & 1 deletion docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ services:
# Note: please keep the default version in sync across
# `posthog` and the `charts-clickhouse` repos
#
image: ${CLICKHOUSE_SERVER_IMAGE:-clickhouse/clickhouse-server:23.12.6.19-alpine}
image: ${CLICKHOUSE_SERVER_IMAGE:-clickhouse/clickhouse-server:23.12.6.19}
restart: on-failure

zookeeper:
Expand Down
3 changes: 2 additions & 1 deletion docker/clickhouse/docker-entrypoint-initdb.d/init-db.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e

apk add python3
apt-get update
apt-get -y install python3
cp -r /idl/* /var/lib/clickhouse/format_schemas/
14 changes: 11 additions & 3 deletions docker/clickhouse/user_defined_function.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
<name>value</name>
</argument>
<format>JSONEachRow</format>
<command>aggregate_funnel.py</command>
<command>aggregate_funnel</command>
<lifetime>600</lifetime>
</function>

<function>
Expand Down Expand Up @@ -62,7 +63,8 @@
<name>value</name>
</argument>
<format>JSONEachRow</format>
<command>aggregate_funnel_cohort.py</command>
<command>aggregate_funnel</command>
<lifetime>600</lifetime>
</function>

<function>
Expand Down Expand Up @@ -95,7 +97,8 @@
<name>value</name>
</argument>
<format>JSONEachRow</format>
<command>aggregate_funnel_array.py</command>
<command>aggregate_funnel</command>
<lifetime>600</lifetime>
</function>

<function>
Expand Down Expand Up @@ -129,6 +132,7 @@
</argument>
<format>JSONEachRow</format>
<command>aggregate_funnel_test.py</command>
<lifetime>600</lifetime>
</function>

<function>
Expand Down Expand Up @@ -170,6 +174,7 @@
</argument>
<format>JSONEachRow</format>
<command>aggregate_funnel_trends.py</command>
<lifetime>600</lifetime>
</function>

<function>
Expand Down Expand Up @@ -208,6 +213,7 @@
</argument>
<format>JSONEachRow</format>
<command>aggregate_funnel_array_trends.py</command>
<lifetime>600</lifetime>
</function>

<function>
Expand Down Expand Up @@ -246,6 +252,7 @@
</argument>
<format>JSONEachRow</format>
<command>aggregate_funnel_cohort_trends.py</command>
<lifetime>600</lifetime>
</function>

<function>
Expand Down Expand Up @@ -283,5 +290,6 @@
</argument>
<format>JSONEachRow</format>
<command>aggregate_funnel_array_trends_test.py</command>
<lifetime>600</lifetime>
</function>
</functions>
1 change: 1 addition & 0 deletions funnel-udf/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
152 changes: 152 additions & 0 deletions funnel-udf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions funnel-udf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "funnels"
version = "0.1.0"
edition = "2021"

[dependencies]
serde = { version = "1.0.104", features = ["derive"] }
serde_json = "1.0.48"
itertools = "0.11"
uuid = { version = "1.10.0", features = ["v4", "serde"] }


[profile.release]
lto = true
Loading

0 comments on commit 97f6b2d

Please sign in to comment.