Add parallel event ingestion to Tinybird alongside existing Postgres/ClickHouse flow. Events are sent to both systems simultaneously via EventBatchingManager. - Add Tinybird client setup and ingest endpoint (zod-bird) - Add event mapping and send utilities with retry/error handling - Add Tinybird datasources and materialized views - Modify EventBatchingManager to dual-write to SQS + Tinybird - Route track events through batching manager Tinybird will silently skip if not configured (TINYBIRD_URL/TINYBIRD_TOKEN).
18 lines
546 B
Plaintext
18 lines
546 B
Plaintext
DESCRIPTION >
|
|
Hourly aggregates with native JSON data type for properties.
|
|
Allows multi-property GROUP BY at query time via properties.field syntax.
|
|
|
|
SCHEMA >
|
|
`org_id` String,
|
|
`env` String,
|
|
`customer_id` String,
|
|
`event_name` String,
|
|
`hour` DateTime,
|
|
`properties` JSON,
|
|
`total_value` SimpleAggregateFunction(sum, Float64),
|
|
`event_count` SimpleAggregateFunction(sum, UInt64)
|
|
|
|
ENGINE "AggregatingMergeTree"
|
|
ENGINE_PARTITION_KEY "toYYYYMM(hour)"
|
|
ENGINE_SORTING_KEY "org_id, env, event_name, hour, customer_id"
|