: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(clickhouse): retire the sessionsv3 role (#88370)
Paweł Szczur899567e0d25b
diff --git a/posthog/clickhouse/hcl/README.md b/posthog/clickhouse/hcl/README.mdindex 9c5b61c49a80..15afe18bc2f4 100644--- a/posthog/clickhouse/hcl/README.md+++ b/posthog/clickhouse/hcl/README.md@@ -5,7 +5,7 @@ Source of truth for satellite ClickHouse clusters, managed declaratively withSchemas are written in HCL, **composed per node** `(env, role)`, verified againstcaptured cluster dumps, and used to generate the migration that applies a change.-Covers the satellite roles (logs, aux, `ai_events`, sessions, sessionsv3, `batch_exports`) in the cloud envs (dev, prod-us, prod-eu) where each exists, plus the local `data` node and the three ingestion roles (`events`, `small`, `medium`) the multinode stack runs.+Covers the satellite roles (logs, aux, `ai_events`, sessions, `batch_exports`) in the cloud envs (dev, prod-us, prod-eu) where each exists, plus the local `data` node and the three ingestion roles (`events`, `small`, `medium`) the multinode stack runs.`ops` is local-only here: posthog-cloud-infra authors its cloud env layers and goldens, composing `roles/ops/shared` vendored from this directory.The `local-single` env models the plain dev stack, where one server hosts every role's objects under the role `all`, composed as the union of the roles the multinode stack splits across nodes.The prod data clusters carry per-env `mat_` columns, so their goldens and per-env override layers live in posthog-cloud-infra (see [The cloud side](#the-cloud-side-posthog-cloud-infra)).diff --git a/posthog/clickhouse/hcl/check.sh b/posthog/clickhouse/hcl/check.shindex f442cc69ca56..89547b09b49a 100755--- a/posthog/clickhouse/hcl/check.sh+++ b/posthog/clickhouse/hcl/check.sh@@ -24,7 +24,6 @@ GOLDEN="$HCL/golden"known_drift_skip() {case "$1" in- prod-us) echo "query_log_archive_old_ops" ;;# writable_error_tracking_issue_fingerprint_embeddings proxies a storage table# migration 0155 dropped on DATA; the ingestion-side objects survived because# 0155 targeted the wrong role, and 0253's cleanup is cloud-only.diff --git a/posthog/clickhouse/hcl/codegen/gen_migration.py b/posthog/clickhouse/hcl/codegen/gen_migration.pyindex fd20c210b582..976e639c1f1e 100644--- a/posthog/clickhouse/hcl/codegen/gen_migration.py+++ b/posthog/clickhouse/hcl/codegen/gen_migration.py@@ -69,7 +69,6 @@ NODE_ROLE_MEMBERS = {# was) and annotated, rather than silently losing the role.NON_TARGET_ROLES = {"batch_exports": "dump-baselined; no NodeRole member",- "sessionsv3": "dump-baselined; no NodeRole member","all": "the local-single dev node; mirrors what migrations produce",}diff --git a/posthog/clickhouse/hcl/golden/prod-us/sessionsv3.hcl b/posthog/clickhouse/hcl/golden/prod-us/sessionsv3.hcldeleted file mode 100644index 2cafbcff0185..000000000000--- a/posthog/clickhouse/hcl/golden/prod-us/sessionsv3.hcl+++ /dev/null@@ -1,2645 +0,0 @@-database "posthog" {- table "events" {- column "uuid" {- type = "UUID"- }- column "event" {- type = "String"- }- column "properties" {- type = "String"- }- column "timestamp" {- type = "DateTime64(6, 'UTC')"- }- column "team_id" {- type = "Int64"- }- column "distinct_id" {- type = "String"- }- column "elements_hash" {- type = "String"- }- column "created_at" {- type = "DateTime64(6, 'UTC')"- }- column "_timestamp" {- type = "DateTime"- }- column "_offset" {- type = "UInt64"- }- column "elements_chain" {- type = "String"- }- column "mat_$user_id" {- type = "String"- comment = "column_materializer::$user_id"- }- column "mat_$browser" {- type = "String"- comment = "column_materializer::$browser"- }- column "mat_$host" {- type = "String"- comment = "column_materializer::$host"- }- column "mat_$current_url" {- type = "String"- comment = "column_materializer::$current_url"- }- column "mat_distinct_id" {- type = "String"- comment = "column_materializer::distinct_id"- }- column "mat_action" {- type = "String"- comment = "column_materializer::action"- }- column "mat_origin" {- type = "String"- comment = "column_materializer::origin"- }- column "mat_email" {- type = "String"- comment = "column_materializer::email"- }- column "mat_key" {- type = "String"- comment = "column_materializer::key"- }- column "mat_insight" {- type = "String"- comment = "column_materializer::insight"- }- column "mat_$event_type" {- type = "String"- comment = "column_materializer::$event_type"- }- column "mat_created_by" {- type = "String"- comment = "column_materializer::created_by"- }- column "mat_total_event_actions_count" {- type = "String"- comment = "column_materializer::total_event_actions_count"- }- column "mat_is_demo_project" {- type = "String"- comment = "column_materializer::is_demo_project"- }- column "mat_$active_feature_flags" {- type = "String"- comment = "column_materializer::$active_feature_flags"- }- column "mat_filters_count" {- type = "String"- comment = "column_materializer::filters_count"- }- column "mat_utm_source" {- type = "String"- comment = "column_materializer::utm_source"- }- column "mat_apiErrorMessage" {- type = "String"- comment = "column_materializer::apiErrorMessage"- }- column "mat_$referring_domain" {- type = "String"- comment = "column_materializer::$referring_domain"- }- column "mat_statusCode" {- type = "String"- comment = "column_materializer::statusCode"- }- column "mat_deal_id" {- type = "String"- comment = "column_materializer::deal_id"- }- column "mat_realm" {- type = "String"- comment = "column_materializer::realm"- }- column "$group_0" {- type = "String"- comment = "column_materializer::$group_0"- }- column "$group_1" {- type = "String"- comment = "column_materializer::$group_1"- }- column "$group_2" {- type = "String"- comment = "column_materializer::$group_2"- }- column "$group_3" {- type = "String"- comment = "column_materializer::$group_3"- }- column "$group_4" {- type = "String"- comment = "column_materializer::$group_4"- }- column "mat_$lib" {- type = "String"- comment = "column_materializer::$lib"- }- column "mat_$os" {- type = "String"- comment = "column_materializer::$os"- }- column "mat_$initial_referrer" {- type = "String"- comment = "column_materializer::$initial_referrer"- }- column "mat_$app_version" {- type = "String"- comment = "column_materializer::$app_version"- }- column "mat_$initial_referring_domain" {- type = "String"- comment = "column_materializer::$initial_referring_domain"- }- column "mat_symbol" {- type = "String"- comment = "column_materializer::symbol"- }- column "mat_page" {- type = "String"- comment = "column_materializer::page"- }- column "mat_type" {- type = "String"- comment = "column_materializer::type"- }- column "mat_currentScreen" {- type = "String"- comment = "column_materializer::currentScreen"- }- column "mat_utm_campaign" {- type = "String"- comment = "column_materializer::utm_campaign"- }- column "mat_is_organization_first_user" {- type = "String"- comment = "column_materializer::is_organization_first_user"- }- column "mat_is_first_component_load" {- type = "String"- comment = "column_materializer::is_first_component_load"- }- column "mat_team" {- type = "String"- comment = "column_materializer::team"- }- column "mat_context" {- type = "String"- comment = "column_materializer::context"- }- column "mat_sdk" {- type = "String"- comment = "column_materializer::sdk"- }- column "mat_created_by_system" {- type = "String"- comment = "column_materializer::created_by_system"- }- column "mat_item_count" {- type = "String"- comment = "column_materializer::item_count"- }- column "mat_$ip" {- type = "String"- comment = "column_materializer::$ip"- }- column "mat_$referrer" {- type = "String"- comment = "column_materializer::$referrer"- }- column "mat_action_name" {- type = "String"- comment = "column_materializer::action_name"- }- column "mat_$geoip_country_name" {- type = "String"- comment = "column_materializer::$geoip_country_name"- }- column "mat_$device_model" {- type = "String"- comment = "column_materializer::$device_model"- }- column "mat_progress" {- type = "String"- comment = "column_materializer::progress"- }- column "mat_chain" {- type = "String"- comment = "column_materializer::chain"- }- column "mat_$device_type" {- type = "String"- comment = "column_materializer::$device_type"- }- column "mat_usd" {- type = "String"- comment = "column_materializer::usd"- }- column "mat_app_name" {- type = "String"- comment = "column_materializer::app_name"- }- column "mat_$screen_name" {- type = "String"- comment = "column_materializer::$screen_name"- }- column "mat_index" {- type = "String"- comment = "column_materializer::index"- }- column "mat_token" {- type = "String"- comment = "column_materializer::token"- }- column "mat_method" {- type = "String"- comment = "column_materializer::method"- }- column "mat_address" {- type = "String"- comment = "column_materializer::address"- }- column "mat_name" {- type = "String"- comment = "column_materializer::name"- }- column "mat_inviteCode" {- type = "String"- comment = "column_materializer::inviteCode"- }- column "$window_id" {- type = "String"- comment = "column_materializer::$window_id"- }- column "$session_id" {- type = "String"- comment = "column_materializer::$session_id"- }- column "mat_osName" {- type = "String"- comment = "column_materializer::osName"- }- column "mat_nativeBuildVersion" {- type = "String"- comment = "column_materializer::nativeBuildVersion"- }- column "mat_revenue" {- type = "String"- comment = "column_materializer::revenue"- }- column "group_0" {- type = "String"- alias = "`$group_0`"- }- column "group_1" {- type = "String"- alias = "`$group_1`"- }- column "group_2" {- type = "String"- alias = "`$group_2`"- }- column "group_3" {- type = "String"- alias = "`$group_3`"- }- column "group_4" {- type = "String"- alias = "`$group_4`"- }- column "alias_mat__user_id" {- type = "String"- alias = "`mat_$user_id`"- }- column "alias_mat__browser" {- type = "String"- alias = "`mat_$browser`"- }- column "alias_mat__host" {- type = "String"- alias = "`mat_$host`"- }- column "alias_mat__current_url" {- type = "String"- alias = "`mat_$current_url`"- }- column "alias_mat__event_type" {- type = "String"- alias = "`mat_$event_type`"- }- column "alias_mat__active_feature_flags" {- type = "String"- alias = "`mat_$active_feature_flags`"- }- column "alias_mat__referring_domain" {- type = "String"- alias = "`mat_$referring_domain`"- }- column "alias_mat__lib" {- type = "String"- alias = "`mat_$lib`"- }- column "alias_mat__os" {- type = "String"- alias = "`mat_$os`"- }- column "alias_mat__initial_referrer" {- type = "String"- alias = "`mat_$initial_referrer`"- }- column "alias_mat__app_version" {- type = "String"- alias = "`mat_$app_version`"- }- column "alias_mat__initial_referring_domain" {- type = "String"- alias = "`mat_$initial_referring_domain`"- }- column "alias_mat__ip" {- type = "String"- alias = "`mat_$ip`"- }- column "alias_mat__referrer" {- type = "String"- alias = "`mat_$referrer`"- }- column "alias_mat__geoip_country_name" {- type = "String"- alias = "`mat_$geoip_country_name`"- }- column "alias_mat__device_model" {- type = "String"- alias = "`mat_$device_model`"- }- column "alias_mat__device_type" {- type = "String"- alias = "`mat_$device_type`"- }- column "alias_mat__screen_name" {- type = "String"- alias = "`mat_$screen_name`"- }- column "person_id" {- type = "UUID"- }- column "person_properties" {- type = "String"- }- column "group0_properties" {- type = "String"- }- column "group1_properties" {- type = "String"- }- column "group2_properties" {- type = "String"- }- column "group3_properties" {- type = "String"- }- column "group4_properties" {- type = "String"- }- column "person_created_at" {- type = "DateTime64(3)"- }- column "group0_created_at" {- type = "DateTime64(3)"- }- column "group1_created_at" {- type = "DateTime64(3)"- }- column "group2_created_at" {- type = "DateTime64(3)"- }- column "group3_created_at" {- type = "DateTime64(3)"- }- column "group4_created_at" {- type = "DateTime64(3)"- }- column "mat_arguments" {- type = "String"- comment = "column_materializer::properties::arguments"- }- column "mat_source" {- type = "String"- comment = "column_materializer::properties::source"- }- column "mat_pp_email" {- type = "String"- comment = "column_materializer::person_properties::email"- }- column "mat_$time" {- type = "String"- comment = "column_materializer::properties::$time"- }- column "mat_$pathname" {- type = "String"- comment = "column_materializer::properties::$pathname"- }- column "mat_$geoip_city_name" {- type = "String"- comment = "column_materializer::properties::$geoip_city_name"- }- column "mat_community_id" {- type = "String"- comment = "column_materializer::properties::community_id"- }- column "mat_thread_id" {- type = "String"- comment = "column_materializer::properties::thread_id"- }- column "mat_Event_productCode" {- type = "String"- comment = "column_materializer::properties::Event.productCode"- }- column "mat_env" {- type = "String"- comment = "column_materializer::properties::env"- }- column "mat_target" {- type = "String"- comment = "column_materializer::properties::target"- }- column "mat_Subscription_plan_amount" {- type = "String"- comment = "column_materializer::properties::Subscription.plan.amount"- }- column "mat_title" {- type = "String"- comment = "column_materializer::properties::title"- }- column "mat_Connection_app_name" {- type = "String"- comment = "column_materializer::properties::Connection.app.name"- }- column "mat_utm_medium" {- type = "String"- comment = "column_materializer::properties::utm_medium"- }- column "mat_Account_client_id" {- type = "String"- comment = "column_materializer::properties::Account.client_id"- }- column "mat_HTTP_Method" {- type = "String"- comment = "column_materializer::properties::HTTP Method"- }- column "mat_audio_duration" {- type = "String"- comment = "column_materializer::properties::audio_duration"- }- column "mat_duration" {- type = "String"- comment = "column_materializer::properties::duration"- }- column "mat_url" {- type = "String"- comment = "column_materializer::properties::url"- }- column "mat_group_id" {- type = "String"- comment = "column_materializer::properties::group_id"- }- column "mat_platform" {- type = "String"- comment = "column_materializer::properties::platform"- }- column "mat_pp_$browser" {- type = "String"- comment = "column_materializer::person_properties::$browser"- }- column "mat_payment_status" {- type = "String"- comment = "column_materializer::properties::payment_status"- }- column "mat_testSessionId" {- type = "String"- comment = "column_materializer::properties::testSessionId"- }- column "inserted_at" {- type = "Nullable(DateTime64(6, 'UTC'))"- default = "now64()"- }- column "mat_$sent_at" {- type = "String"- comment = "column_materializer::properties::$sent_at"- }- column "mat_pp_companyName" {- type = "String"- comment = "column_materializer::person_properties::companyName"- }- column "mat_function" {- type = "String"- comment = "column_materializer::properties::function"- }- column "mat_store_url" {- type = "String"- comment = "column_materializer::properties::store_url"- }- column "mat_email_domain" {- type = "String"- comment = "column_materializer::properties::email_domain"- }- column "mat_institution_name" {- type = "String"- comment = "column_materializer::properties::institution_name"- }- column "mat_authentication_method" {- type = "String"- comment = "column_materializer::properties::authentication_method"- }- column "mat_initial_step" {- type = "String"- comment = "column_materializer::properties::initial_step"- }- column "mat_status_message" {- type = "String"- comment = "column_materializer::properties::status_message"- }- column "mat_mode" {- type = "String"- comment = "column_materializer::properties::mode"- }- column "mat_protocol" {- type = "String"- comment = "column_materializer::properties::protocol"- }- column "mat_job_type" {- type = "String"- comment = "column_materializer::properties::job_type"- }- column "mat_is_oauth" {- type = "String"- comment = "column_materializer::properties::is_oauth"- }- column "mat_is_initial_aggregation" {- type = "String"- comment = "column_materializer::properties::is_initial_aggregation"- }- column "mat_search_term" {- type = "String"- comment = "column_materializer::properties::search_term"- }- column "mat_valid_ach_accounts" {- type = "String"- comment = "column_materializer::properties::valid_ach_accounts"- }- column "mat_gross" {- type = "String"- comment = "column_materializer::properties::gross"- }- column "mat_orderType" {- type = "String"- comment = "column_materializer::properties::orderType"- }- column "mat_sku" {- type = "String"- comment = "column_materializer::properties::sku"- }- column "mat_dual_channel" {- type = "String"- comment = "column_materializer::properties::dual_channel"- }- column "mat_channel" {- type = "String"- comment = "column_materializer::properties::channel"- }- column "mat_workspaceId" {- type = "String"- comment = "column_materializer::properties::workspaceId"- }- column "mat_numberOfSecrets" {- type = "String"- comment = "column_materializer::properties::numberOfSecrets"- }- column "mat_organizations" {- type = "String"- comment = "column_materializer::properties::organizations"- }- column "mat_organization" {- type = "String"- comment = "column_materializer::properties::organization"- }- column "mat_contributionError" {- type = "String"- comment = "column_materializer::properties::contributionError"- }- column "mat_phone" {- type = "String"- comment = "column_materializer::properties::phone"- }- column "mat_$initial_pathname" {- type = "String"- comment = "column_materializer::properties::$initial_pathname"- }- column "mat_organization_name" {- type = "String"- comment = "column_materializer::properties::organization_name"- }- column "mat_category" {- type = "String"- comment = "column_materializer::properties::category"- }- column "mat_$lib_version" {- type = "String"- comment = "column_materializer::properties::$lib_version"- }- column "mat_pp_$initial_utm_campaign" {- type = "String"- comment = "column_materializer::person_properties::$initial_utm_campaign"- }- column "mat_pp_$initial_utm_medium" {- type = "String"- comment = "column_materializer::person_properties::$initial_utm_medium"- }- column "mat_pp_$initial_gclid" {- type = "String"- comment = "column_materializer::person_properties::$initial_gclid"- }- column "mat_pp_$initial_gad_source" {- type = "String"- comment = "column_materializer::person_properties::$initial_gad_source"- }- column "mat_pp_$initial_utm_source" {- type = "String"- comment = "column_materializer::person_properties::$initial_utm_source"- }- column "mat_pp_$initial_referring_domain" {- type = "String"- comment = "column_materializer::person_properties::$initial_referring_domain"- }- column "mat_pp_$initial_utm_term" {- type = "String"- comment = "column_materializer::person_properties::$initial_utm_term"- }- column "mat_pp_$initial_utm_content" {- type = "String"- comment = "column_materializer::person_properties::$initial_utm_content"- }- column "mat_pp_$initial_gbraid" {- type = "String"- comment = "column_materializer::person_properties::$initial_gbraid::disabled"- }- column "mat_pp_$initial_wbraid" {- type = "String"- comment = "column_materializer::person_properties::$initial_wbraid::disabled"- }- column "mat_pp_$initial_msclkid" {- type = "String"- comment = "column_materializer::person_properties::$initial_msclkid"- }- column "mat_pp_$initial_fbclid" {- type = "String"- comment = "column_materializer::person_properties::$initial_fbclid"- }- column "mat_$geoip_subdivision_1_code" {- type = "String"- comment = "column_materializer::properties::$geoip_subdivision_1_code"- }- column "mat_wlo_enabled" {- type = "String"- comment = "column_materializer::properties::wlo_enabled"- }- column "mat_$prev_pageview_max_scroll_percentage" {- type = "String"- comment = "column_materializer::properties::$prev_pageview_max_scroll_percentage"- }- column "mat_$prev_pageview_max_content_percentage" {- type = "String"- comment = "column_materializer::properties::$prev_pageview_max_content_percentage"- }- column "mat_$prev_pageview_pathname" {- type = "String"- comment = "column_materializer::properties::$prev_pageview_pathname"- }- column "mat_pp_$initial_pathname" {- type = "String"- comment = "column_materializer::person_properties::$initial_pathname"- }- column "mat_pp_$geoip_country_code" {- type = "String"- comment = "column_materializer::person_properties::$geoip_country_code"- }- column "mat_pp_username" {- type = "String"- comment = "column_materializer::person_properties::username"- }- column "mat_pp_serverMasterclass" {- type = "String"- comment = "column_materializer::person_properties::serverMasterclass"- }- column "mat_content_length" {- type = "String"- comment = "column_materializer::properties::content_length"- }- column "mat_pp_serverMarketing" {- type = "String"- comment = "column_materializer::person_properties::serverMarketing"- }- column "mat_$browser_version" {- type = "String"- comment = "column_materializer::properties::$browser_version"- }- column "mat_pp_role" {- type = "String"- comment = "column_materializer::person_properties::role"- }- column "mat_pp_customer" {- type = "String"- comment = "column_materializer::person_properties::customer"- }- column "mat_event" {- type = "String"- comment = "column_materializer::properties::event"- }- column "mat_disable_institution_search" {- type = "String"- comment = "column_materializer::properties::disable_institution_search"- }- column "mat_is_first_event_for_user" {- type = "String"- comment = "column_materializer::properties::is_first_event_for_user"- }- column "mat_current_member_guid" {- type = "String"- comment = "column_materializer::properties::current_member_guid"- }- column "mat_user_agent" {- type = "String"- comment = "column_materializer::properties::user_agent"- }- column "mat_is_test_user" {- type = "String"- comment = "column_materializer::properties::is_test_user"- }- column "mat_referrer" {- type = "String"- comment = "column_materializer::properties::referrer"- }- column "mat_pp_$initial_current_url" {- type = "String"- comment = "column_materializer::person_properties::$initial_current_url"- }- column "mat_most_recent_app_os" {- type = "String"- comment = "column_materializer::properties::most_recent_app_os"- }- column "mat_pp_hubspot_score" {- type = "String"- comment = "column_materializer::person_properties::hubspot_score"- }- column "mat_pp_id" {- type = "String"- comment = "column_materializer::person_properties::id"- }- column "mat_pp_$current_url" {- type = "String"- comment = "column_materializer::person_properties::$current_url"- }- column "mat_product_key" {- type = "String"- comment = "column_materializer::properties::product_key"- }- column "mat_Plan_type_and_filter" {- type = "String"- comment = "column_materializer::properties::Plan type and filter"- }- column "mat_$app_namespace" {- type = "String"- comment = "column_materializer::properties::$app_namespace"- }- column "mat_$os_name" {- type = "String"- comment = "column_materializer::properties::$os_name"- }- column "mat_pp_$os_name" {- type = "String"- comment = "column_materializer::person_properties::$os_name::disabled"- }- column "mat_pp_$app_version" {- type = "String"- comment = "column_materializer::person_properties::$app_version"- }- column "mat_subscriptionStatus" {- type = "String"- comment = "column_materializer::properties::subscriptionStatus"- }- column "mat_$screen_height" {- type = "String"- comment = "column_materializer::properties::$screen_height"- }- column "mat_$screen_width" {- type = "String"- comment = "column_materializer::properties::$screen_width"- }- column "mat_tag" {- type = "String"- comment = "column_materializer::properties::tag"- }- column "mat_$app_build" {- type = "String"- comment = "column_materializer::properties::$app_build"- }- column "mat_surface_tag" {- type = "String"- comment = "column_materializer::properties::surface_tag"- }- column "mat_survey_responses_count_in_period" {- type = "String"- comment = "column_materializer::properties::survey_responses_count_in_period"- }- column "mat_event_count_in_month" {- type = "String"- comment = "column_materializer::properties::event_count_in_month"- }- column "mat_ramp" {- type = "String"- comment = "column_materializer::properties::ramp"- }- column "mat_auto_chapters" {- type = "String"- comment = "column_materializer::properties::auto_chapters"- }- column "mat_sentiment_analysis" {- type = "String"- comment = "column_materializer::properties::sentiment_analysis"- }- column "mat_redact_pii" {- type = "String"- comment = "column_materializer::properties::redact_pii"- }- column "mat_content_safety" {- type = "String"- comment = "column_materializer::properties::content_safety"- }- column "mat_iab_categories" {- type = "String"- comment = "column_materializer::properties::iab_categories"- }- column "mat_auto_highlights" {- type = "String"- comment = "column_materializer::properties::auto_highlights"- }- column "mat_entity_detection" {- type = "String"- comment = "column_materializer::properties::entity_detection"- }- column "mat_summarization" {- type = "String"- comment = "column_materializer::properties::summarization"- }- column "mat_pp_val_region" {- type = "String"- comment = "column_materializer::person_properties::val_region"- }- column "mat_client_id" {- type = "String"- comment = "column_materializer::properties::client_id"- }- column "mat_$geoip_country_code" {- type = "String"- comment = "column_materializer::properties::$geoip_country_code"- }- column "mat_disfluencies" {- type = "String"- comment = "column_materializer::properties::disfluencies"- }- column "mat_filter_profanity" {- type = "String"- comment = "column_materializer::properties::filter_profanity"- }- column "mat_speaker_labels" {- type = "String"- comment = "column_materializer::properties::speaker_labels"- }- column "mat_language_detection" {- type = "String"- comment = "column_materializer::properties::language_detection"- }- column "mat_product_analytics_projected_amount" {- type = "String"- comment = "column_materializer::properties::product_analytics_projected_amount"- }- column "mat_recordings_projected_amount" {- type = "String"- comment = "column_materializer::properties::recordings_projected_amount"- }- column "mat_events_projected_amount" {- type = "String"- comment = "column_materializer::properties::events_projected_amount"- }- column "mat_session_replay_projected_amount" {- type = "String"- comment = "column_materializer::properties::session_replay_projected_amount"- }- column "mat_total_usd" {- type = "String"- comment = "column_materializer::properties::total_usd"- }- column "mat_stripe_amount_paid" {- type = "String"- comment = "column_materializer::properties::stripe_amount_paid"- }- column "mat_workspace" {- type = "String"- comment = "column_materializer::properties::workspace"- }- column "mat_created_at" {- type = "String"- comment = "column_materializer::properties::created_at"- }- column "mat_kind" {- type = "String"- comment = "column_materializer::properties::kind"- }- column "mat_product" {- type = "String"- comment = "column_materializer::properties::product"- }- column "mat_message" {- type = "String"- comment = "column_materializer::properties::message"- }- column "mat_initiator" {- type = "String"- comment = "column_materializer::properties::initiator"- }- column "mat_query" {- type = "String"- comment = "column_materializer::properties::query"- }- column "mat_$survey_id" {- type = "String"- comment = "column_materializer::properties::$survey_id"- }- column "mat_$survey_response_1" {- type = "String"- comment = "column_materializer::properties::$survey_response_1"- }- column "mat_ticketId" {- type = "String"- comment = "column_materializer::properties::ticketId"- }- column "mat_$survey_response" {- type = "String"- comment = "column_materializer::properties::$survey_response"- }- column "mat_conceptName" {- type = "String"- comment = "column_materializer::properties::conceptName"- }- column "mat_apiName" {- type = "String"- comment = "column_materializer::properties::apiName"- }- column "mat_workplace_billing_plan" {- type = "String"- comment = "column_materializer::properties::workplace_billing_plan"- }- column "mat_$el_text" {- type = "String"- comment = "column_materializer::properties::$el_text"- }- column "mat_recording_count_in_period" {- type = "String"- comment = "column_materializer::properties::recording_count_in_period"- }- column "mat_$os_version" {- type = "String"- comment = "column_materializer::properties::$os_version"- }- column "mat_orderId" {- type = "String"- comment = "column_materializer::properties::orderId"- }- column "mat_commit_sha" {- type = "String"- comment = "column_materializer::properties::commit_sha"- }- column "mat_$feature_flag_payloads" {- type = "String"- comment = "column_materializer::properties::$feature_flag_payloads"- }- column "mat_event_count_in_period" {- type = "String"- comment = "column_materializer::properties::event_count_in_period"- }- column "mat_$groups" {- type = "String"- comment = "column_materializer::properties::$groups"- }- column "mat_$feature_flag" {- type = "String"- comment = "column_materializer::properties::$feature_flag"- }- column "mat_utm_content" {- type = "String"- comment = "column_materializer::properties::utm_content"- }- column "mat_gclid" {- type = "String"- comment = "column_materializer::properties::gclid"- }- column "mat_gad_source" {- type = "String"- comment = "column_materializer::properties::gad_source"- }- column "mat_gbraid" {- type = "String"- comment = "column_materializer::properties::gbraid"- }- column "mat_wbraid" {- type = "String"- comment = "column_materializer::properties::wbraid"- }- column "mat_fbclid" {- type = "String"- comment = "column_materializer::properties::fbclid"- }- column "mat_msclkid" {- type = "String"- comment = "column_materializer::properties::msclkid"- }- column "mat_organization_id" {- type = "String"- comment = "column_materializer::properties::organization_id"- }- column "mat_owner_type" {- type = "String"- comment = "column_materializer::properties::owner_type"- }- column "mat_device_type" {- type = "String"- comment = "column_materializer::properties::device_type"- }- column "mat_$device_id" {- type = "String"- comment = "column_materializer::properties::$device_id"- }- column "mat_pp_$geoip_continent_name" {- type = "String"- comment = "column_materializer::person_properties::$geoip_continent_name"- }- column "mat_$feature_flag_response" {- type = "String"- comment = "column_materializer::properties::$feature_flag_response"- }- column "mat_pp_utm_source" {- type = "String"- comment = "column_materializer::person_properties::utm_source"- }- column "mat_pp_$referring_domain" {- type = "String"- comment = "column_materializer::person_properties::$referring_domain"- }- column "mat_pp_Email_Domain" {- type = "String"- comment = "column_materializer::person_properties::Email Domain"- }- column "mat_machine_id" {- type = "String"- comment = "column_materializer::properties::machine_id"- }- column "mat_user_email_domain" {- type = "String"- comment = "column_materializer::properties::user_email_domain"- }- column "mat_$lib_version__minor" {- type = "String"- comment = "column_materializer::properties::$lib_version__minor"- }- column "mat_region" {- type = "String"- comment = "column_materializer::properties::region"- }- column "mat_pp_user_email_domain" {- type = "String"- comment = "column_materializer::person_properties::user_email_domain"- }- column "mat_url_promotion_id" {- type = "String"- comment = "column_materializer::properties::url_promotion_id"- }- column "mat_$lib_custom_api_host" {- type = "String"- comment = "column_materializer::properties::$lib_custom_api_host"- }- column "person_mode" {- type = "Enum8('full'=0, 'propertyless'=1, 'force_upgrade'=2)"- }- column "mat_user_platform" {- type = "String"- comment = "column_materializer::properties::user_platform"- }- column "mat_pp_$geoip_country_name" {- type = "String"- comment = "column_materializer::person_properties::$geoip_country_name"- }- column "mat_environment" {- type = "String"- comment = "column_materializer::properties::environment"- }- column "mat_customer_email" {- type = "String"- comment = "column_materializer::properties::customer_email"- }- column "mat_client_name" {- type = "String"- comment = "column_materializer::properties::client_name"- }- column "mat_screen_name" {- type = "String"- comment = "column_materializer::properties::screen_name"- }- column "mat_app_version" {- type = "String"- comment = "column_materializer::properties::app_version"- }- column "elements_chain_href" {- type = "String"- comment = "column_materializer::elements_chain::href"- }- column "elements_chain_texts" {- type = "Array(String)"- comment = "column_materializer::elements_chain::texts"- }- column "elements_chain_ids" {- type = "Array(String)"- comment = "column_materializer::elements_chain::ids"- }- column "elements_chain_elements" {- type = "Array(Enum8('a'=1, 'button'=2, 'form'=3, 'input'=4, 'select'=5, 'textarea'=6, 'label'=7))"- comment = "column_materializer::elements_chain::elements"- }- column "properties_group_custom" {- type = "Map(String, String)"- }- column "properties_group_feature_flags" {- type = "Map(String, String)"- }- column "is_deleted" {- type = "Bool"- }- column "mat_subdomain" {- type = "String"- comment = "column_materializer::properties::subdomain"- }- column "mat_$device" {- type = "String"- comment = "column_materializer::properties::$device"- }- column "mat_id" {- type = "String"- comment = "column_materializer::properties::id"- }- column "mat_record_id" {- type = "String"- comment = "column_materializer::properties::record_id"- }- column "mat_referrer_id" {- type = "String"- comment = "column_materializer::properties::record_id"- }- column "mat_$exception_issue_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_issue_id"- }- column "mat_$exception_fingerprint" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_fingerprint"- }- column "mat_$web_vitals_LCP_value" {- type = "Nullable(String)"- comment = "column_materializer::properties::$web_vitals_LCP_value"- }- column "mat_$web_vitals_FCP_value" {- type = "Nullable(String)"- comment = "column_materializer::properties::$web_vitals_FCP_value"- }- column "mat_$web_vitals_CLS_value" {- type = "Nullable(String)"- comment = "column_materializer::properties::$web_vitals_CLS_value"- }- column "mat_$web_vitals_INP_value" {- type = "Nullable(String)"- comment = "column_materializer::properties::$web_vitals_INP_value"- }- column "mat_$viewport_width" {- type = "Nullable(String)"- comment = "column_materializer::properties::$viewport_width"- }- column "mat_$viewport_height" {- type = "Nullable(String)"- comment = "column_materializer::properties::$viewport_height"- }- column "mat_$anon_distinct_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$anon_distinct_id"- }- column "person_properties_map_custom" {- type = "Map(String, String)"- }- column "mat_$ai_trace_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_trace_id"- }- column "mat_$ai_model" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_model"- }- column "mat_$ai_provider" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_provider"- }- column "mat_$ai_parent_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_parent_id"- }- column "mat_$ai_span_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_span_id"- }- column "mat_$ai_http_status" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_http_status"- }- column "mat_$exception_types" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_types"- }- column "mat_$exception_values" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_values"- }- column "mat_$exception_sources" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_sources"- }- column "mat_$exception_functions" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_functions"- }- column "$session_id_uuid" {- type = "Nullable(UInt128)"- }- column "mat_$process_person_profile" {- type = "Nullable(String)"- comment = "column_materializer::properties::$process_person_profile"- }- column "consumer_breadcrumbs" {- type = "Array(String)"- }- column "properties_group_ai" {- type = "Map(String, String)"- }- column "mat_$is_identified" {- type = "Nullable(String)"- comment = "column_materializer::properties::$is_identified"- }- column "mat_historical_migration" {- type = "Nullable(String)"- comment = "column_materializer::properties::historical_migration"- }- column "mat_$ai_session_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_session_id"- }- column "mat_$ai_is_error" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_is_error"- }- column "dmat_string_0" {- type = "Nullable(String)"- }- column "dmat_string_1" {- type = "Nullable(String)"- }- column "dmat_string_2" {- type = "Nullable(String)"- }- column "dmat_string_3" {- type = "Nullable(String)"- }- column "dmat_string_4" {- type = "Nullable(String)"- }- column "dmat_string_5" {- type = "Nullable(String)"- }- column "dmat_string_6" {- type = "Nullable(String)"- }- column "dmat_string_7" {- type = "Nullable(String)"- }- column "dmat_string_8" {- type = "Nullable(String)"- }- column "dmat_string_9" {- type = "Nullable(String)"- }- column "dmat_numeric_0" {- type = "Nullable(Float64)"- }- column "dmat_numeric_1" {- type = "Nullable(Float64)"- }- column "dmat_numeric_2" {- type = "Nullable(Float64)"- }- column "dmat_numeric_3" {- type = "Nullable(Float64)"- }- column "dmat_numeric_4" {- type = "Nullable(Float64)"- }- column "dmat_numeric_5" {- type = "Nullable(Float64)"- }- column "dmat_numeric_6" {- type = "Nullable(Float64)"- }- column "dmat_numeric_7" {- type = "Nullable(Float64)"- }- column "dmat_numeric_8" {- type = "Nullable(Float64)"- }- column "dmat_numeric_9" {- type = "Nullable(Float64)"- }- column "dmat_bool_0" {- type = "Nullable(UInt8)"- }- column "dmat_bool_1" {- type = "Nullable(UInt8)"- }- column "dmat_bool_2" {- type = "Nullable(UInt8)"- }- column "dmat_bool_3" {- type = "Nullable(UInt8)"- }- column "dmat_bool_4" {- type = "Nullable(UInt8)"- }- column "dmat_bool_5" {- type = "Nullable(UInt8)"- }- column "dmat_bool_6" {- type = "Nullable(UInt8)"- }- column "dmat_bool_7" {- type = "Nullable(UInt8)"- }- column "dmat_bool_8" {- type = "Nullable(UInt8)"- }- column "dmat_bool_9" {- type = "Nullable(UInt8)"- }- column "dmat_datetime_0" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_1" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_2" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_3" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_4" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_5" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_6" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_7" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_8" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_9" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "historical_migration" {- type = "Bool"- }- column "mat_$ai_total_cost_usd" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_total_cost_usd"- }- column "properties_group_ai_large" {- type = "Map(String, String)"- }- column "mat_$ai_prompt_name" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_prompt_name"- }- engine "distributed" {- cluster_name = "posthog"- remote_database = "posthog"- remote_table = "sharded_events"- sharding_key = "sipHash64(distinct_id)"- }- }-- table "query_log_archive" {- column "hostname" {- type = "LowCardinality(String)"- }- column "user" {- type = "LowCardinality(String)"- }- column "query_id" {- type = "String"- }- column "initial_query_id" {- type = "String"- }- column "is_initial_query" {- type = "UInt8"- }- column "type" {- type = "Enum8('QueryStart'=1, 'QueryFinish'=2, 'ExceptionBeforeStart'=3, 'ExceptionWhileProcessing'=4)"- }- column "event_date" {- type = "Date"- }- column "event_time" {- type = "DateTime"- }- column "event_time_microseconds" {- type = "DateTime64(6)"- }- column "query_start_time" {- type = "DateTime"- }- column "query_start_time_microseconds" {- type = "DateTime64(6)"- }- column "query_duration_ms" {- type = "UInt64"- }- column "read_rows" {- type = "UInt64"- }- column "read_bytes" {- type = "UInt64"- }- column "written_rows" {- type = "UInt64"- }- column "written_bytes" {- type = "UInt64"- }- column "result_rows" {- type = "UInt64"- }- column "result_bytes" {- type = "UInt64"- }- column "memory_usage" {- type = "UInt64"- }- column "peak_threads_usage" {- type = "UInt64"- }- column "current_database" {- type = "LowCardinality(String)"- }- column "query" {- type = "String"- }- column "formatted_query" {- type = "String"- }- column "normalized_query_hash" {- type = "UInt64"- }- column "query_kind" {- type = "LowCardinality(String)"- }- column "exception_code" {- type = "Int32"- }- column "exception" {- type = "String"- }- column "stack_trace" {- type = "String"- }- column "team_id" {- type = "Int64"- }- column "log_comment" {- type = "JSON(max_dynamic_paths=256, access_method LowCardinality(String), alert_config_id String, api_key_label String, api_key_mask String, batch_export_id String, chargeable Bool, client_query_id String, cohort_id Int64, `dagster.job_name` String, `dagster.run_id` String, `dagster.tags.owner` String, dashboard_id Int64, experiment_feature_flag_key String, experiment_id Int64, feature LowCardinality(String), id String, insight_id Int64, is_impersonated Bool, kind LowCardinality(String), name String, org_id String, person_on_events_mode LowCardinality(String), product LowCardinality(String), query_type LowCardinality(String), request_name String, route_id String, service_name String, session_id String, table_id String, team_id Int64, `temporal.activity_id` String, `temporal.activity_type` String, `temporal.attempt` Int64, `temporal.workflow_id` String, `temporal.workflow_namespace` String, `temporal.workflow_run_id` String, `temporal.workflow_type` String, user_id Int64, warehouse_query Bool, workflow LowCardinality(String), workload LowCardinality(String), SKIP cache_key, SKIP filter, SKIP hogql_features, SKIP http_referer, SKIP http_request_id, SKIP http_user_agent, SKIP query_settings, SKIP timings, SKIP user_email)"- }- column "ProfileEvents" {- type = "Map(String, UInt64)"- }- column "exception_name" {- type = "String"- alias = "errorCodeToName(exception_code)"- }- column "ProfileEvents_RealTimeMicroseconds" {- type = "Int64"- alias = "ProfileEvents['RealTimeMicroseconds']"- }- column "ProfileEvents_OSCPUVirtualTimeMicroseconds" {- type = "Int64"- alias = "ProfileEvents['OSCPUVirtualTimeMicroseconds']"- }- column "ProfileEvents_S3Clients" {- type = "Int64"- alias = "ProfileEvents['S3Clients']"- }- column "ProfileEvents_S3DeleteObjects" {- type = "Int64"- alias = "ProfileEvents['S3DeleteObjects']"- }- column "ProfileEvents_S3CopyObject" {- type = "Int64"- alias = "ProfileEvents['S3CopyObject']"- }- column "ProfileEvents_S3ListObjects" {- type = "Int64"- alias = "ProfileEvents['S3ListObjects']"- }- column "ProfileEvents_S3HeadObject" {- type = "Int64"- alias = "ProfileEvents['S3HeadObject']"- }- column "ProfileEvents_S3GetObjectAttributes" {- type = "Int64"- alias = "ProfileEvents['S3GetObjectAttributes']"- }- column "ProfileEvents_S3CreateMultipartUpload" {- type = "Int64"- alias = "ProfileEvents['S3CreateMultipartUpload']"- }- column "ProfileEvents_S3UploadPartCopy" {- type = "Int64"- alias = "ProfileEvents['S3UploadPartCopy']"- }- column "ProfileEvents_S3UploadPart" {- type = "Int64"- alias = "ProfileEvents['S3UploadPart']"- }- column "ProfileEvents_S3AbortMultipartUpload" {- type = "Int64"- alias = "ProfileEvents['S3AbortMultipartUpload']"- }- column "ProfileEvents_S3CompleteMultipartUpload" {- type = "Int64"- alias = "ProfileEvents['S3CompleteMultipartUpload']"- }- column "ProfileEvents_S3PutObject" {- type = "Int64"- alias = "ProfileEvents['S3PutObject']"- }- column "ProfileEvents_S3GetObject" {- type = "Int64"- alias = "ProfileEvents['S3GetObject']"- }- column "ProfileEvents_ReadBufferFromS3Bytes" {- type = "Int64"- alias = "ProfileEvents['ReadBufferFromS3Bytes']"- }- column "ProfileEvents_WriteBufferFromS3Bytes" {- type = "Int64"- alias = "ProfileEvents['WriteBufferFromS3Bytes']"- }- column "lc_workflow" {- type = "LowCardinality(String)"- alias = "log_comment.workflow"- }- column "lc_kind" {- type = "LowCardinality(String)"- alias = "log_comment.kind"- }- column "lc_id" {- type = "String"- alias = "CAST(log_comment.id, 'String')"- }- column "lc_route_id" {- type = "String"- alias = "CAST(log_comment.route_id, 'String')"- }- column "lc_access_method" {- type = "LowCardinality(String)"- alias = "log_comment.access_method"- }- column "lc_api_key_label" {- type = "String"- alias = "CAST(log_comment.api_key_label, 'String')"- }- column "lc_api_key_mask" {- type = "String"- alias = "CAST(log_comment.api_key_mask, 'String')"- }- column "lc_query_type" {- type = "LowCardinality(String)"- alias = "log_comment.query_type"- }- column "lc_product" {- type = "LowCardinality(String)"- alias = "log_comment.product"- }- column "lc_chargeable" {- type = "Bool"- alias = "log_comment.chargeable"- }- column "lc_name" {- type = "String"- alias = "CAST(log_comment.name, 'String')"- }- column "lc_request_name" {- type = "String"- alias = "CAST(log_comment.request_name, 'String')"- }- column "lc_client_query_id" {- type = "String"- alias = "CAST(log_comment.client_query_id, 'String')"- }- column "lc_org_id" {- type = "String"- alias = "CAST(log_comment.org_id, 'String')"- }- column "lc_user_id" {- type = "Int64"- alias = "log_comment.user_id"- }- column "lc_is_impersonated" {- type = "Bool"- alias = "log_comment.is_impersonated"- }- column "lc_session_id" {- type = "String"- alias = "CAST(log_comment.session_id, 'String')"- }- column "lc_dashboard_id" {- type = "Int64"- alias = "log_comment.dashboard_id"- }- column "lc_insight_id" {- type = "Int64"- alias = "log_comment.insight_id"- }- column "lc_cohort_id" {- type = "Int64"- alias = "log_comment.cohort_id"- }- column "lc_batch_export_id" {- type = "String"- alias = "CAST(log_comment.batch_export_id, 'String')"- }- column "lc_experiment_id" {- type = "Int64"- alias = "log_comment.experiment_id"- }- column "lc_experiment_feature_flag_key" {- type = "String"- alias = "CAST(log_comment.experiment_feature_flag_key, 'String')"- }- column "lc_alert_config_id" {- type = "String"- alias = "CAST(log_comment.alert_config_id, 'String')"- }- column "lc_feature" {- type = "LowCardinality(String)"- alias = "log_comment.feature"- }- column "lc_table_id" {- type = "String"- alias = "CAST(log_comment.table_id, 'String')"- }- column "lc_warehouse_query" {- type = "Bool"- alias = "log_comment.warehouse_query"- }- column "lc_person_on_events_mode" {- type = "LowCardinality(String)"- alias = "log_comment.person_on_events_mode"- }- column "lc_service_name" {- type = "String"- alias = "CAST(log_comment.service_name, 'String')"- }- column "lc_workload" {- type = "LowCardinality(String)"- alias = "log_comment.workload"- }- column "lc_query__kind" {- type = "LowCardinality(String)"- alias = "if(JSONHas(toString(log_comment), 'query', 'source'), JSONExtractString(toString(log_comment), 'query', 'source', 'kind'), JSONExtractString(toString(log_comment), 'query', 'kind'))"- }- column "lc_query__query" {- type = "String"- alias = "multiIf(NOT is_initial_query, '', JSONHas(toString(log_comment), 'query', 'source'), JSONExtractString(toString(log_comment), 'query', 'source', 'query'), JSONExtractString(toString(log_comment), 'query', 'query'))"- }- column "lc_query" {- type = "String"- alias = "if(is_initial_query, JSONExtractRaw(toString(log_comment), 'query'), '')"- }- column "lc_temporal__workflow_namespace" {- type = "String"- alias = "CAST(log_comment.`temporal.workflow_namespace`, 'String')"- }- column "lc_temporal__workflow_type" {- type = "String"- alias = "CAST(log_comment.`temporal.workflow_type`, 'String')"- }- column "lc_temporal__workflow_id" {- type = "String"- alias = "CAST(log_comment.`temporal.workflow_id`, 'String')"- }- column "lc_temporal__workflow_run_id" {- type = "String"- alias = "CAST(log_comment.`temporal.workflow_run_id`, 'String')"- }- column "lc_temporal__activity_type" {- type = "String"- alias = "CAST(log_comment.`temporal.activity_type`, 'String')"- }- column "lc_temporal__activity_id" {- type = "String"- alias = "CAST(log_comment.`temporal.activity_id`, 'String')"- }- column "lc_temporal__attempt" {- type = "Int64"- alias = "log_comment.`temporal.attempt`"- }- column "lc_dagster__job_name" {- type = "String"- alias = "CAST(log_comment.`dagster.job_name`, 'String')"- }- column "lc_dagster__run_id" {- type = "String"- alias = "CAST(log_comment.`dagster.run_id`, 'String')"- }- column "lc_dagster__owner" {- type = "String"- alias = "CAST(log_comment.`dagster.tags.owner`, 'String')"- }- column "lc_modifiers" {- type = "String"- alias = "if(is_initial_query, JSONExtractRaw(toString(log_comment), 'modifiers'), '')"- }- engine "distributed" {- cluster_name = "ops"- remote_database = "posthog"- remote_table = "sharded_query_log_archive"- }- }-- table "query_log_archive_old_ops" {- column "hostname" {- type = "LowCardinality(String)"- }- column "user" {- type = "LowCardinality(String)"- }- column "query_id" {- type = "String"- }- column "initial_query_id" {- type = "String"- }- column "is_initial_query" {- type = "UInt8"- }- column "type" {- type = "Enum8('QueryStart'=1, 'QueryFinish'=2, 'ExceptionBeforeStart'=3, 'ExceptionWhileProcessing'=4)"- }- column "event_date" {- type = "Date"- }- column "event_time" {- type = "DateTime"- }- column "event_time_microseconds" {- type = "DateTime64(6)"- }- column "query_start_time" {- type = "DateTime"- }- column "query_start_time_microseconds" {- type = "DateTime64(6)"- }- column "query_duration_ms" {- type = "UInt64"- }- column "read_rows" {- type = "UInt64"- }- column "read_bytes" {- type = "UInt64"- }- column "written_rows" {- type = "UInt64"- }- column "written_bytes" {- type = "UInt64"- }- column "result_rows" {- type = "UInt64"- }- column "result_bytes" {- type = "UInt64"- }- column "memory_usage" {- type = "UInt64"- }- column "peak_threads_usage" {- type = "UInt64"- }- column "current_database" {- type = "LowCardinality(String)"- }- column "query" {- type = "String"- }- column "formatted_query" {- type = "String"- }- column "normalized_query_hash" {- type = "UInt64"- }- column "query_kind" {- type = "LowCardinality(String)"- }- column "exception_code" {- type = "Int32"- }- column "exception_name" {- type = "String"- alias = "errorCodeToName(exception_code)"- }- column "exception" {- type = "String"- }- column "stack_trace" {- type = "String"- }- column "ProfileEvents_RealTimeMicroseconds" {- type = "Int64"- }- column "ProfileEvents_OSCPUVirtualTimeMicroseconds" {- type = "Int64"- }- column "ProfileEvents_S3Clients" {- type = "Int64"- }- column "ProfileEvents_S3DeleteObjects" {- type = "Int64"- }- column "ProfileEvents_S3CopyObject" {- type = "Int64"- }- column "ProfileEvents_S3ListObjects" {- type = "Int64"- }- column "ProfileEvents_S3HeadObject" {- type = "Int64"- }- column "ProfileEvents_S3GetObjectAttributes" {- type = "Int64"- }- column "ProfileEvents_S3CreateMultipartUpload" {- type = "Int64"- }- column "ProfileEvents_S3UploadPartCopy" {- type = "Int64"- }- column "ProfileEvents_S3UploadPart" {- type = "Int64"- }- column "ProfileEvents_S3AbortMultipartUpload" {- type = "Int64"- }- column "ProfileEvents_S3CompleteMultipartUpload" {- type = "Int64"- }- column "ProfileEvents_S3PutObject" {- type = "Int64"- }- column "ProfileEvents_S3GetObject" {- type = "Int64"- }- column "ProfileEvents_ReadBufferFromS3Bytes" {- type = "Int64"- }- column "ProfileEvents_WriteBufferFromS3Bytes" {- type = "Int64"- }- column "ProfileEvents" {- type = "Map(String, UInt64)"- }- column "lc_workflow" {- type = "LowCardinality(String)"- }- column "lc_kind" {- type = "LowCardinality(String)"- }- column "lc_id" {- type = "String"- }- column "lc_route_id" {- type = "String"- }- column "lc_access_method" {- type = "LowCardinality(String)"- }- column "lc_api_key_label" {- type = "String"- }- column "lc_api_key_mask" {- type = "String"- }- column "lc_query_type" {- type = "LowCardinality(String)"- }- column "lc_product" {- type = "LowCardinality(String)"- }- column "lc_chargeable" {- type = "Bool"- }- column "lc_name" {- type = "String"- }- column "lc_request_name" {- type = "String"- }- column "lc_client_query_id" {- type = "String"- }- column "lc_org_id" {- type = "String"- }- column "team_id" {- type = "Int64"- }- column "lc_user_id" {- type = "Int64"- }- column "lc_is_impersonated" {- type = "Bool"- }- column "lc_session_id" {- type = "String"- }- column "lc_dashboard_id" {- type = "Int64"- }- column "lc_insight_id" {- type = "Int64"- }- column "lc_cohort_id" {- type = "Int64"- }- column "lc_batch_export_id" {- type = "String"- }- column "lc_experiment_id" {- type = "Int64"- }- column "lc_experiment_feature_flag_key" {- type = "String"- }- column "lc_alert_config_id" {- type = "String"- }- column "lc_feature" {- type = "LowCardinality(String)"- }- column "lc_table_id" {- type = "String"- }- column "lc_warehouse_query" {- type = "Bool"- }- column "lc_person_on_events_mode" {- type = "LowCardinality(String)"- }- column "lc_service_name" {- type = "String"- }- column "lc_workload" {- type = "LowCardinality(String)"- }- column "lc_query__kind" {- type = "LowCardinality(String)"- }- column "lc_query__query" {- type = "String"- }- column "lc_query" {- type = "String"- }- column "lc_temporal__workflow_namespace" {- type = "String"- }- column "lc_temporal__workflow_type" {- type = "String"- }- column "lc_temporal__workflow_id" {- type = "String"- }- column "lc_temporal__workflow_run_id" {- type = "String"- }- column "lc_temporal__activity_type" {- type = "String"- }- column "lc_temporal__activity_id" {- type = "String"- }- column "lc_temporal__attempt" {- type = "Int64"- }- column "lc_dagster__job_name" {- type = "String"- }- column "lc_dagster__run_id" {- type = "String"- }- column "lc_dagster__owner" {- type = "String"- }- column "lc_modifiers" {- type = "String"- }- engine "distributed" {- cluster_name = "ops"- remote_database = "posthog"- remote_table = "query_log_archive_old"- }- }-- table "raw_sessions_v3" {- order_by = ["team_id", "session_timestamp", "session_id_v7"]- partition_by = "toYYYYMM(session_timestamp)"- settings = {- index_granularity = "8192"- }- column "team_id" {- type = "Int64"- }- column "session_id_v7" {- type = "UInt128"- }- column "session_timestamp" {- type = "DateTime64(3)"- default = "fromUnixTimestamp64Milli(toUInt64(bitShiftRight(session_id_v7, 80)))"- }- column "distinct_id" {- type = "AggregateFunction(argMax, String, DateTime64(6, 'UTC'))"- }- column "distinct_ids" {- type = "AggregateFunction(groupUniqArray, String)"- }- column "min_timestamp" {- type = "SimpleAggregateFunction(min, DateTime64(6, 'UTC'))"- }- column "max_timestamp" {- type = "SimpleAggregateFunction(max, DateTime64(6, 'UTC'))"- }- column "max_inserted_at" {- type = "SimpleAggregateFunction(max, DateTime64(6, 'UTC'))"- }- column "urls" {- type = "SimpleAggregateFunction(groupUniqArrayArray(2000), Array(String))"- }- column "entry_url" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "end_url" {- type = "AggregateFunction(argMax, Nullable(String), DateTime64(6, 'UTC'))"- }- column "last_external_click_url" {- type = "AggregateFunction(argMax, Nullable(String), DateTime64(6, 'UTC'))"- }- column "browser" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "browser_version" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "os" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "os_version" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "device_type" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "viewport_width" {- type = "AggregateFunction(argMin, Nullable(Int64), DateTime64(6, 'UTC'))"- }- column "viewport_height" {- type = "AggregateFunction(argMin, Nullable(Int64), DateTime64(6, 'UTC'))"- }- column "geoip_country_code" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "geoip_subdivision_1_code" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "geoip_subdivision_1_name" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "geoip_subdivision_city_name" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "geoip_time_zone" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_referring_domain" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_utm_source" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_utm_campaign" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_utm_medium" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_utm_term" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_utm_content" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_gclid" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_gad_source" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_fbclid" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_has_gclid" {- type = "AggregateFunction(argMin, Bool, DateTime64(6, 'UTC'))"- }- column "entry_has_fbclid" {- type = "AggregateFunction(argMin, Bool, DateTime64(6, 'UTC'))"- }- column "entry_ad_ids_map" {- type = "AggregateFunction(argMin, Map(String, String), DateTime64(6, 'UTC'))"- }- column "entry_ad_ids_set" {- type = "AggregateFunction(argMin, Array(String), DateTime64(6, 'UTC'))"- }- column "entry_channel_type_properties" {- type = "AggregateFunction(argMin, Tuple(Nullable(String), Nullable(String), Nullable(String), Nullable(String), Bool, Bool, Nullable(String)), DateTime64(6, 'UTC'))"- }- column "pageview_uniq" {- type = "AggregateFunction(uniqExact, Nullable(UUID))"- }- column "autocapture_uniq" {- type = "AggregateFunction(uniqExact, Nullable(UUID))"- }- column "screen_uniq" {- type = "AggregateFunction(uniqExact, Nullable(UUID))"- }- column "page_screen_uniq_up_to" {- type = "AggregateFunction(uniqUpTo(1), Nullable(UUID))"- }- column "has_autocapture" {- type = "SimpleAggregateFunction(max, Bool)"- }- column "flag_values" {- type = "AggregateFunction(groupUniqArrayMap, Map(String, String))"- }- column "flag_keys" {- type = "SimpleAggregateFunction(groupUniqArrayArray, Array(String))"- }- column "event_names" {- type = "SimpleAggregateFunction(groupUniqArrayArray, Array(String))"- }- column "hosts" {- type = "SimpleAggregateFunction(groupUniqArrayArray(100), Array(String))"- }- column "emails" {- type = "SimpleAggregateFunction(groupUniqArrayArray(10), Array(String))"- }- column "has_replay_events" {- type = "SimpleAggregateFunction(max, Bool)"- }- index "event_names_bloom_filter" {- expr = "event_names"- type = "bloom_filter()"- granularity = 1- }- index "flag_keys_bloom_filter" {- expr = "flag_keys"- type = "bloom_filter()"- granularity = 1- }- engine "aggregating_merge_tree" {- }- }-- table "writable_query_log_archive" {- column "hostname" {- type = "LowCardinality(String)"- }- column "user" {- type = "LowCardinality(String)"- }- column "query_id" {- type = "String"- }- column "initial_query_id" {- type = "String"- }- column "is_initial_query" {- type = "UInt8"- }- column "type" {- type = "Enum8('QueryStart'=1, 'QueryFinish'=2, 'ExceptionBeforeStart'=3, 'ExceptionWhileProcessing'=4)"- }- column "event_date" {- type = "Date"- }- column "event_time" {- type = "DateTime"- }- column "event_time_microseconds" {- type = "DateTime64(6)"- }- column "query_start_time" {- type = "DateTime"- }- column "query_start_time_microseconds" {- type = "DateTime64(6)"- }- column "query_duration_ms" {- type = "UInt64"- }- column "read_rows" {- type = "UInt64"- }- column "read_bytes" {- type = "UInt64"- }- column "written_rows" {- type = "UInt64"- }- column "written_bytes" {- type = "UInt64"- }- column "result_rows" {- type = "UInt64"- }- column "result_bytes" {- type = "UInt64"- }- column "memory_usage" {- type = "UInt64"- }- column "peak_threads_usage" {- type = "UInt64"- }- column "current_database" {- type = "LowCardinality(String)"- }- column "query" {- type = "String"- }- column "formatted_query" {- type = "String"- }- column "normalized_query_hash" {- type = "UInt64"- }- column "query_kind" {- type = "LowCardinality(String)"- }- column "exception_code" {- type = "Int32"- }- column "exception" {- type = "String"- }- column "stack_trace" {- type = "String"- }- column "team_id" {- type = "Int64"- }- column "log_comment" {- type = "JSON(max_dynamic_paths=256, access_method LowCardinality(String), alert_config_id String, api_key_label String, api_key_mask String, batch_export_id String, chargeable Bool, client_query_id String, cohort_id Int64, `dagster.job_name` String, `dagster.run_id` String, `dagster.tags.owner` String, dashboard_id Int64, experiment_feature_flag_key String, experiment_id Int64, feature LowCardinality(String), id String, insight_id Int64, is_impersonated Bool, kind LowCardinality(String), name String, org_id String, person_on_events_mode LowCardinality(String), product LowCardinality(String), query_type LowCardinality(String), request_name String, route_id String, service_name String, session_id String, table_id String, team_id Int64, `temporal.activity_id` String, `temporal.activity_type` String, `temporal.attempt` Int64, `temporal.workflow_id` String, `temporal.workflow_namespace` String, `temporal.workflow_run_id` String, `temporal.workflow_type` String, user_id Int64, warehouse_query Bool, workflow LowCardinality(String), workload LowCardinality(String), SKIP cache_key, SKIP filter, SKIP hogql_features, SKIP http_referer, SKIP http_request_id, SKIP http_user_agent, SKIP query_settings, SKIP timings, SKIP user_email)"- }- column "ProfileEvents" {- type = "Map(String, UInt64)"- }- engine "distributed" {- cluster_name = "ops"- remote_database = "posthog"- remote_table = "query_log_archive_buffer"- }- }-- materialized_view "ops_query_log_archive_mv" {- to_table = "posthog.writable_query_log_archive"- query = <<SQL-SELECT- hostname,- user,- query_id,- initial_query_id,- is_initial_query,- type,- event_date,- event_time,- event_time_microseconds,- query_start_time,- query_start_time_microseconds,- query_duration_ms,- read_rows,- read_bytes,- written_rows,- written_bytes,- result_rows,- result_bytes,- memory_usage,- peak_threads_usage,- current_database,- query,- formatted_query,- normalized_query_hash,- query_kind,- exception_code,- exception,- stack_trace,- JSONExtractInt(log_comment, 'team_id') AS team_id,- if(isValidJSON(log_comment), log_comment, '{}') AS log_comment,- ProfileEvents-FROM system.query_log-WHERE type != 'QueryStart'-SQL-- column "hostname" {- type = "LowCardinality(String)"- }- column "user" {- type = "LowCardinality(String)"- }- column "query_id" {- type = "String"- }- column "initial_query_id" {- type = "String"- }- column "is_initial_query" {- type = "UInt8"- }- column "type" {- type = "Enum8('QueryStart'=1, 'QueryFinish'=2, 'ExceptionBeforeStart'=3, 'ExceptionWhileProcessing'=4)"- }- column "event_date" {- type = "Date"- }- column "event_time" {- type = "DateTime"- }- column "event_time_microseconds" {- type = "DateTime64(6)"- }- column "query_start_time" {- type = "DateTime"- }- column "query_start_time_microseconds" {- type = "DateTime64(6)"- }- column "query_duration_ms" {- type = "UInt64"- }- column "read_rows" {- type = "UInt64"- }- column "read_bytes" {- type = "UInt64"- }- column "written_rows" {- type = "UInt64"- }- column "written_bytes" {- type = "UInt64"- }- column "result_rows" {- type = "UInt64"- }- column "result_bytes" {- type = "UInt64"- }- column "memory_usage" {- type = "UInt64"- }- column "peak_threads_usage" {- type = "UInt64"- }- column "current_database" {- type = "LowCardinality(String)"- }- column "query" {- type = "String"- }- column "formatted_query" {- type = "String"- }- column "normalized_query_hash" {- type = "UInt64"- }- column "query_kind" {- type = "LowCardinality(String)"- }- column "exception_code" {- type = "Int32"- }- column "exception" {- type = "String"- }- column "stack_trace" {- type = "String"- }- column "team_id" {- type = "Int64"- }- column "log_comment" {- type = "String"- }- column "ProfileEvents" {- type = "Map(LowCardinality(String), UInt64)"- }- }-- view "custom_metrics_backups" {- query = <<SQL-WITH- ['ClickHouseCustomMetric_BackupFailed', 'ClickHouseCustomMetric_BackupSuccess', 'ClickHouseCustomMetric_BackupCancelled', 'ClickHouseCustomMetric_BackupAttempts'] AS names,- [toInt64(countIf(status = 'BACKUP_FAILED')), toInt64(countIf(status = 'BACKUP_CREATED')), toInt64(countIf(status = 'BACKUP_CANCELLED')), toInt64(countIf(status = 'CREATING_BACKUP'))] AS values,- ['Number of failed backups', 'Number of successful backups', 'Number of cancelled backups', 'Number of backup attempts'] AS descriptions,- ['gauge', 'gauge', 'gauge', 'gauge'] AS types,- arrayJoin(arrayZip(names, values, descriptions, types)) AS tpl-SELECT- tpl.1 AS name,- map('instance', hostname()) AS labels,- tpl.2 AS value,- tpl.3 AS help,- tpl.4 AS type-FROM system.backup_log-WHERE event_date = today()-GROUP BY- event_date-SQL-- }-- view "custom_metrics_dictionaries" {- query = <<SQL-SELECT- 'ClickHouseCustomMetric_DictionariesFailed' AS name,- map(- 'instance',- hostname(),- 'database',- d.database,- 'dictionary',- d.dict_name,- 'uuid',- toString(d.uuid),- 'status',- toString(d.status)- ) AS labels,- toUInt64(1) AS value,- 'Dictionary is in FAILED or FAILED_AND_RELOADING status' AS help,- 'gauge' AS type-FROM- (- SELECT name AS dict_name, database, uuid, status- FROM system.dictionaries- WHERE status IN ('FAILED', 'FAILED_AND_RELOADING')- ) AS d-SQL-- }-- view "custom_metrics_part_counts" {- query = <<SQL-SELECT- 'ClickHouseCustomMetric_MaxPartCountPerPartition' AS name,- map('instance', hostname(), 'database', database, 'table', `table`, 'partition', partition) AS labels,- part_count AS value,- 'Maximum number of active parts for any partition in a PostHog table' AS help,- 'gauge' AS type-FROM- (- SELECT database, `table`, partition, count() AS part_count- FROM system.parts- WHERE- active- AND- (database = 'posthog')- GROUP BY- database, `table`, partition- ORDER BY database ASC, `table` ASC, part_count DESC, partition ASC- LIMIT 1 BY database, `table`- )-SQL-- }-- view "custom_metrics_replication_queue" {- query = <<SQL-WITH- ['ClickHouseCustomMetric_ReplicationQueueStuckEntries', 'ClickHouseCustomMetric_ReplicationQueueMaxPostponedEntrySeconds', 'ClickHouseCustomMetric_ReplicationQueueMaxErrorEntrySeconds'] AS names,- [toInt64(countIf(create_time < (now() - toIntervalDay(15)))), maxIf(dateDiff('seconds', create_time, last_postpone_time), last_postpone_time != '1970-01-01'), maxIf(dateDiff('seconds', create_time, last_exception_time), (last_exception_time != '1970-01-01') AND (last_exception_time > (now() - toIntervalMinute(5))))] AS values,- ['Number of entries that have been in the replication queue for more than 15 days', 'Maximum number of seconds that an entry has been postponed', 'Maximum number of seconds that an entry has been in error'] AS descriptions,- ['gauge', 'gauge', 'gauge'] AS types,- arrayJoin(arrayZip(names, values, descriptions, types)) AS tpl-SELECT- tpl.1 AS name,- map('table', `table`, 'instance', hostname()) AS labels,- tpl.2 AS value,- tpl.3 AS help,- tpl.4 AS type-FROM system.replication_queue-GROUP BY- `table`-HAVING- value > 0-SQL-- }-- view "custom_metrics_server_crash" {- query = <<SQL-SELECT- 'ClickHouseCustomMetric_ServerCrash' AS name,- map('instance', hostname()) AS labels,- count() AS value,- 'Number of server crashes for current date' AS help,- 'gauge' AS type-FROM system.crash_log-WHERE event_date = today()-GROUP BY- hostname()-SQL-- }-- view "custom_metrics_table_sizes" {- query = <<SQL-SELECT- 'ClickHouseCustomMetric_TableTotalBytes' AS name,- map('instance', hostname(), 'database', database, 'table', `table`) AS labels,- CAST(total_bytes, 'Float64') AS value,- 'Size of a database table on a given node (need a sum for sharded)' AS help,- 'gauge' AS type-FROM system.tables-WHERE- (database NOT IN ('INFORMATION_SCHEMA', 'information_schema'))-AND- (total_bytes IS NOT NULL)-SQL-- }-- view "custom_metrics_test" {- query = <<SQL-SELECT- 'ClickHouseCustomMetric_Test' AS name,- map('instance', hostname()) AS labels,- 1 AS value,- 'Test to check that the metric endpoint is working' AS help,- 'gauge' AS type-SQL-- }-}diff --git a/posthog/clickhouse/hcl/manifest.hcl b/posthog/clickhouse/hcl/manifest.hclindex f298d2d0b1ff..778805287bbb 100644--- a/posthog/clickhouse/hcl/manifest.hcl+++ b/posthog/clickhouse/hcl/manifest.hcl@@ -83,12 +83,6 @@ role "sessions" {env "prod-eu" { layers = ["roles/shared", "roles/coshared/sessions_data", "roles/sessions/shared", "roles/sessions/prod-eu"] }}-# SESSIONSV3 satellite: US-only node hosting the v3 session tables (events replica,-# raw_sessions_v3) plus the query_log_archive path. Dump-baselined.-role "sessionsv3" {- env "prod-us" { layers = ["roles/shared", "roles/sessionsv3/prod-us"] }-}-# BATCH_EXPORTS satellite: hosts the sharded_events_recent data table (the recent-events# store the export workers read; data/ops reach it via Distributed proxies) plus the# query_log_archive path. Env-specific — prod-eu carries an extra historical_migrationdiff --git a/posthog/clickhouse/hcl/roles/sessionsv3/prod-us/tables.hcl b/posthog/clickhouse/hcl/roles/sessionsv3/prod-us/tables.hcldeleted file mode 100644index 846619900890..000000000000--- a/posthog/clickhouse/hcl/roles/sessionsv3/prod-us/tables.hcl+++ /dev/null@@ -1,1915 +0,0 @@-database "posthog" {- table "events" {- column "uuid" {- type = "UUID"- }- column "event" {- type = "String"- }- column "properties" {- type = "String"- }- column "timestamp" {- type = "DateTime64(6, 'UTC')"- }- column "team_id" {- type = "Int64"- }- column "distinct_id" {- type = "String"- }- column "elements_hash" {- type = "String"- }- column "created_at" {- type = "DateTime64(6, 'UTC')"- }- column "_timestamp" {- type = "DateTime"- }- column "_offset" {- type = "UInt64"- }- column "elements_chain" {- type = "String"- }- column "mat_$user_id" {- type = "String"- comment = "column_materializer::$user_id"- }- column "mat_$browser" {- type = "String"- comment = "column_materializer::$browser"- }- column "mat_$host" {- type = "String"- comment = "column_materializer::$host"- }- column "mat_$current_url" {- type = "String"- comment = "column_materializer::$current_url"- }- column "mat_distinct_id" {- type = "String"- comment = "column_materializer::distinct_id"- }- column "mat_action" {- type = "String"- comment = "column_materializer::action"- }- column "mat_origin" {- type = "String"- comment = "column_materializer::origin"- }- column "mat_email" {- type = "String"- comment = "column_materializer::email"- }- column "mat_key" {- type = "String"- comment = "column_materializer::key"- }- column "mat_insight" {- type = "String"- comment = "column_materializer::insight"- }- column "mat_$event_type" {- type = "String"- comment = "column_materializer::$event_type"- }- column "mat_created_by" {- type = "String"- comment = "column_materializer::created_by"- }- column "mat_total_event_actions_count" {- type = "String"- comment = "column_materializer::total_event_actions_count"- }- column "mat_is_demo_project" {- type = "String"- comment = "column_materializer::is_demo_project"- }- column "mat_$active_feature_flags" {- type = "String"- comment = "column_materializer::$active_feature_flags"- }- column "mat_filters_count" {- type = "String"- comment = "column_materializer::filters_count"- }- column "mat_utm_source" {- type = "String"- comment = "column_materializer::utm_source"- }- column "mat_apiErrorMessage" {- type = "String"- comment = "column_materializer::apiErrorMessage"- }- column "mat_$referring_domain" {- type = "String"- comment = "column_materializer::$referring_domain"- }- column "mat_statusCode" {- type = "String"- comment = "column_materializer::statusCode"- }- column "mat_deal_id" {- type = "String"- comment = "column_materializer::deal_id"- }- column "mat_realm" {- type = "String"- comment = "column_materializer::realm"- }- column "$group_0" {- type = "String"- comment = "column_materializer::$group_0"- }- column "$group_1" {- type = "String"- comment = "column_materializer::$group_1"- }- column "$group_2" {- type = "String"- comment = "column_materializer::$group_2"- }- column "$group_3" {- type = "String"- comment = "column_materializer::$group_3"- }- column "$group_4" {- type = "String"- comment = "column_materializer::$group_4"- }- column "mat_$lib" {- type = "String"- comment = "column_materializer::$lib"- }- column "mat_$os" {- type = "String"- comment = "column_materializer::$os"- }- column "mat_$initial_referrer" {- type = "String"- comment = "column_materializer::$initial_referrer"- }- column "mat_$app_version" {- type = "String"- comment = "column_materializer::$app_version"- }- column "mat_$initial_referring_domain" {- type = "String"- comment = "column_materializer::$initial_referring_domain"- }- column "mat_symbol" {- type = "String"- comment = "column_materializer::symbol"- }- column "mat_page" {- type = "String"- comment = "column_materializer::page"- }- column "mat_type" {- type = "String"- comment = "column_materializer::type"- }- column "mat_currentScreen" {- type = "String"- comment = "column_materializer::currentScreen"- }- column "mat_utm_campaign" {- type = "String"- comment = "column_materializer::utm_campaign"- }- column "mat_is_organization_first_user" {- type = "String"- comment = "column_materializer::is_organization_first_user"- }- column "mat_is_first_component_load" {- type = "String"- comment = "column_materializer::is_first_component_load"- }- column "mat_team" {- type = "String"- comment = "column_materializer::team"- }- column "mat_context" {- type = "String"- comment = "column_materializer::context"- }- column "mat_sdk" {- type = "String"- comment = "column_materializer::sdk"- }- column "mat_created_by_system" {- type = "String"- comment = "column_materializer::created_by_system"- }- column "mat_item_count" {- type = "String"- comment = "column_materializer::item_count"- }- column "mat_$ip" {- type = "String"- comment = "column_materializer::$ip"- }- column "mat_$referrer" {- type = "String"- comment = "column_materializer::$referrer"- }- column "mat_action_name" {- type = "String"- comment = "column_materializer::action_name"- }- column "mat_$geoip_country_name" {- type = "String"- comment = "column_materializer::$geoip_country_name"- }- column "mat_$device_model" {- type = "String"- comment = "column_materializer::$device_model"- }- column "mat_progress" {- type = "String"- comment = "column_materializer::progress"- }- column "mat_chain" {- type = "String"- comment = "column_materializer::chain"- }- column "mat_$device_type" {- type = "String"- comment = "column_materializer::$device_type"- }- column "mat_usd" {- type = "String"- comment = "column_materializer::usd"- }- column "mat_app_name" {- type = "String"- comment = "column_materializer::app_name"- }- column "mat_$screen_name" {- type = "String"- comment = "column_materializer::$screen_name"- }- column "mat_index" {- type = "String"- comment = "column_materializer::index"- }- column "mat_token" {- type = "String"- comment = "column_materializer::token"- }- column "mat_method" {- type = "String"- comment = "column_materializer::method"- }- column "mat_address" {- type = "String"- comment = "column_materializer::address"- }- column "mat_name" {- type = "String"- comment = "column_materializer::name"- }- column "mat_inviteCode" {- type = "String"- comment = "column_materializer::inviteCode"- }- column "$window_id" {- type = "String"- comment = "column_materializer::$window_id"- }- column "$session_id" {- type = "String"- comment = "column_materializer::$session_id"- }- column "mat_osName" {- type = "String"- comment = "column_materializer::osName"- }- column "mat_nativeBuildVersion" {- type = "String"- comment = "column_materializer::nativeBuildVersion"- }- column "mat_revenue" {- type = "String"- comment = "column_materializer::revenue"- }- column "group_0" {- type = "String"- alias = "`$group_0`"- }- column "group_1" {- type = "String"- alias = "`$group_1`"- }- column "group_2" {- type = "String"- alias = "`$group_2`"- }- column "group_3" {- type = "String"- alias = "`$group_3`"- }- column "group_4" {- type = "String"- alias = "`$group_4`"- }- column "alias_mat__user_id" {- type = "String"- alias = "`mat_$user_id`"- }- column "alias_mat__browser" {- type = "String"- alias = "`mat_$browser`"- }- column "alias_mat__host" {- type = "String"- alias = "`mat_$host`"- }- column "alias_mat__current_url" {- type = "String"- alias = "`mat_$current_url`"- }- column "alias_mat__event_type" {- type = "String"- alias = "`mat_$event_type`"- }- column "alias_mat__active_feature_flags" {- type = "String"- alias = "`mat_$active_feature_flags`"- }- column "alias_mat__referring_domain" {- type = "String"- alias = "`mat_$referring_domain`"- }- column "alias_mat__lib" {- type = "String"- alias = "`mat_$lib`"- }- column "alias_mat__os" {- type = "String"- alias = "`mat_$os`"- }- column "alias_mat__initial_referrer" {- type = "String"- alias = "`mat_$initial_referrer`"- }- column "alias_mat__app_version" {- type = "String"- alias = "`mat_$app_version`"- }- column "alias_mat__initial_referring_domain" {- type = "String"- alias = "`mat_$initial_referring_domain`"- }- column "alias_mat__ip" {- type = "String"- alias = "`mat_$ip`"- }- column "alias_mat__referrer" {- type = "String"- alias = "`mat_$referrer`"- }- column "alias_mat__geoip_country_name" {- type = "String"- alias = "`mat_$geoip_country_name`"- }- column "alias_mat__device_model" {- type = "String"- alias = "`mat_$device_model`"- }- column "alias_mat__device_type" {- type = "String"- alias = "`mat_$device_type`"- }- column "alias_mat__screen_name" {- type = "String"- alias = "`mat_$screen_name`"- }- column "person_id" {- type = "UUID"- }- column "person_properties" {- type = "String"- }- column "group0_properties" {- type = "String"- }- column "group1_properties" {- type = "String"- }- column "group2_properties" {- type = "String"- }- column "group3_properties" {- type = "String"- }- column "group4_properties" {- type = "String"- }- column "person_created_at" {- type = "DateTime64(3)"- }- column "group0_created_at" {- type = "DateTime64(3)"- }- column "group1_created_at" {- type = "DateTime64(3)"- }- column "group2_created_at" {- type = "DateTime64(3)"- }- column "group3_created_at" {- type = "DateTime64(3)"- }- column "group4_created_at" {- type = "DateTime64(3)"- }- column "mat_arguments" {- type = "String"- comment = "column_materializer::properties::arguments"- }- column "mat_source" {- type = "String"- comment = "column_materializer::properties::source"- }- column "mat_pp_email" {- type = "String"- comment = "column_materializer::person_properties::email"- }- column "mat_$time" {- type = "String"- comment = "column_materializer::properties::$time"- }- column "mat_$pathname" {- type = "String"- comment = "column_materializer::properties::$pathname"- }- column "mat_$geoip_city_name" {- type = "String"- comment = "column_materializer::properties::$geoip_city_name"- }- column "mat_community_id" {- type = "String"- comment = "column_materializer::properties::community_id"- }- column "mat_thread_id" {- type = "String"- comment = "column_materializer::properties::thread_id"- }- column "mat_Event_productCode" {- type = "String"- comment = "column_materializer::properties::Event.productCode"- }- column "mat_env" {- type = "String"- comment = "column_materializer::properties::env"- }- column "mat_target" {- type = "String"- comment = "column_materializer::properties::target"- }- column "mat_Subscription_plan_amount" {- type = "String"- comment = "column_materializer::properties::Subscription.plan.amount"- }- column "mat_title" {- type = "String"- comment = "column_materializer::properties::title"- }- column "mat_Connection_app_name" {- type = "String"- comment = "column_materializer::properties::Connection.app.name"- }- column "mat_utm_medium" {- type = "String"- comment = "column_materializer::properties::utm_medium"- }- column "mat_Account_client_id" {- type = "String"- comment = "column_materializer::properties::Account.client_id"- }- column "mat_HTTP_Method" {- type = "String"- comment = "column_materializer::properties::HTTP Method"- }- column "mat_audio_duration" {- type = "String"- comment = "column_materializer::properties::audio_duration"- }- column "mat_duration" {- type = "String"- comment = "column_materializer::properties::duration"- }- column "mat_url" {- type = "String"- comment = "column_materializer::properties::url"- }- column "mat_group_id" {- type = "String"- comment = "column_materializer::properties::group_id"- }- column "mat_platform" {- type = "String"- comment = "column_materializer::properties::platform"- }- column "mat_pp_$browser" {- type = "String"- comment = "column_materializer::person_properties::$browser"- }- column "mat_payment_status" {- type = "String"- comment = "column_materializer::properties::payment_status"- }- column "mat_testSessionId" {- type = "String"- comment = "column_materializer::properties::testSessionId"- }- column "inserted_at" {- type = "Nullable(DateTime64(6, 'UTC'))"- default = "now64()"- }- column "mat_$sent_at" {- type = "String"- comment = "column_materializer::properties::$sent_at"- }- column "mat_pp_companyName" {- type = "String"- comment = "column_materializer::person_properties::companyName"- }- column "mat_function" {- type = "String"- comment = "column_materializer::properties::function"- }- column "mat_store_url" {- type = "String"- comment = "column_materializer::properties::store_url"- }- column "mat_email_domain" {- type = "String"- comment = "column_materializer::properties::email_domain"- }- column "mat_institution_name" {- type = "String"- comment = "column_materializer::properties::institution_name"- }- column "mat_authentication_method" {- type = "String"- comment = "column_materializer::properties::authentication_method"- }- column "mat_initial_step" {- type = "String"- comment = "column_materializer::properties::initial_step"- }- column "mat_status_message" {- type = "String"- comment = "column_materializer::properties::status_message"- }- column "mat_mode" {- type = "String"- comment = "column_materializer::properties::mode"- }- column "mat_protocol" {- type = "String"- comment = "column_materializer::properties::protocol"- }- column "mat_job_type" {- type = "String"- comment = "column_materializer::properties::job_type"- }- column "mat_is_oauth" {- type = "String"- comment = "column_materializer::properties::is_oauth"- }- column "mat_is_initial_aggregation" {- type = "String"- comment = "column_materializer::properties::is_initial_aggregation"- }- column "mat_search_term" {- type = "String"- comment = "column_materializer::properties::search_term"- }- column "mat_valid_ach_accounts" {- type = "String"- comment = "column_materializer::properties::valid_ach_accounts"- }- column "mat_gross" {- type = "String"- comment = "column_materializer::properties::gross"- }- column "mat_orderType" {- type = "String"- comment = "column_materializer::properties::orderType"- }- column "mat_sku" {- type = "String"- comment = "column_materializer::properties::sku"- }- column "mat_dual_channel" {- type = "String"- comment = "column_materializer::properties::dual_channel"- }- column "mat_channel" {- type = "String"- comment = "column_materializer::properties::channel"- }- column "mat_workspaceId" {- type = "String"- comment = "column_materializer::properties::workspaceId"- }- column "mat_numberOfSecrets" {- type = "String"- comment = "column_materializer::properties::numberOfSecrets"- }- column "mat_organizations" {- type = "String"- comment = "column_materializer::properties::organizations"- }- column "mat_organization" {- type = "String"- comment = "column_materializer::properties::organization"- }- column "mat_contributionError" {- type = "String"- comment = "column_materializer::properties::contributionError"- }- column "mat_phone" {- type = "String"- comment = "column_materializer::properties::phone"- }- column "mat_$initial_pathname" {- type = "String"- comment = "column_materializer::properties::$initial_pathname"- }- column "mat_organization_name" {- type = "String"- comment = "column_materializer::properties::organization_name"- }- column "mat_category" {- type = "String"- comment = "column_materializer::properties::category"- }- column "mat_$lib_version" {- type = "String"- comment = "column_materializer::properties::$lib_version"- }- column "mat_pp_$initial_utm_campaign" {- type = "String"- comment = "column_materializer::person_properties::$initial_utm_campaign"- }- column "mat_pp_$initial_utm_medium" {- type = "String"- comment = "column_materializer::person_properties::$initial_utm_medium"- }- column "mat_pp_$initial_gclid" {- type = "String"- comment = "column_materializer::person_properties::$initial_gclid"- }- column "mat_pp_$initial_gad_source" {- type = "String"- comment = "column_materializer::person_properties::$initial_gad_source"- }- column "mat_pp_$initial_utm_source" {- type = "String"- comment = "column_materializer::person_properties::$initial_utm_source"- }- column "mat_pp_$initial_referring_domain" {- type = "String"- comment = "column_materializer::person_properties::$initial_referring_domain"- }- column "mat_pp_$initial_utm_term" {- type = "String"- comment = "column_materializer::person_properties::$initial_utm_term"- }- column "mat_pp_$initial_utm_content" {- type = "String"- comment = "column_materializer::person_properties::$initial_utm_content"- }- column "mat_pp_$initial_gbraid" {- type = "String"- comment = "column_materializer::person_properties::$initial_gbraid::disabled"- }- column "mat_pp_$initial_wbraid" {- type = "String"- comment = "column_materializer::person_properties::$initial_wbraid::disabled"- }- column "mat_pp_$initial_msclkid" {- type = "String"- comment = "column_materializer::person_properties::$initial_msclkid"- }- column "mat_pp_$initial_fbclid" {- type = "String"- comment = "column_materializer::person_properties::$initial_fbclid"- }- column "mat_$geoip_subdivision_1_code" {- type = "String"- comment = "column_materializer::properties::$geoip_subdivision_1_code"- }- column "mat_wlo_enabled" {- type = "String"- comment = "column_materializer::properties::wlo_enabled"- }- column "mat_$prev_pageview_max_scroll_percentage" {- type = "String"- comment = "column_materializer::properties::$prev_pageview_max_scroll_percentage"- }- column "mat_$prev_pageview_max_content_percentage" {- type = "String"- comment = "column_materializer::properties::$prev_pageview_max_content_percentage"- }- column "mat_$prev_pageview_pathname" {- type = "String"- comment = "column_materializer::properties::$prev_pageview_pathname"- }- column "mat_pp_$initial_pathname" {- type = "String"- comment = "column_materializer::person_properties::$initial_pathname"- }- column "mat_pp_$geoip_country_code" {- type = "String"- comment = "column_materializer::person_properties::$geoip_country_code"- }- column "mat_pp_username" {- type = "String"- comment = "column_materializer::person_properties::username"- }- column "mat_pp_serverMasterclass" {- type = "String"- comment = "column_materializer::person_properties::serverMasterclass"- }- column "mat_content_length" {- type = "String"- comment = "column_materializer::properties::content_length"- }- column "mat_pp_serverMarketing" {- type = "String"- comment = "column_materializer::person_properties::serverMarketing"- }- column "mat_$browser_version" {- type = "String"- comment = "column_materializer::properties::$browser_version"- }- column "mat_pp_role" {- type = "String"- comment = "column_materializer::person_properties::role"- }- column "mat_pp_customer" {- type = "String"- comment = "column_materializer::person_properties::customer"- }- column "mat_event" {- type = "String"- comment = "column_materializer::properties::event"- }- column "mat_disable_institution_search" {- type = "String"- comment = "column_materializer::properties::disable_institution_search"- }- column "mat_is_first_event_for_user" {- type = "String"- comment = "column_materializer::properties::is_first_event_for_user"- }- column "mat_current_member_guid" {- type = "String"- comment = "column_materializer::properties::current_member_guid"- }- column "mat_user_agent" {- type = "String"- comment = "column_materializer::properties::user_agent"- }- column "mat_is_test_user" {- type = "String"- comment = "column_materializer::properties::is_test_user"- }- column "mat_referrer" {- type = "String"- comment = "column_materializer::properties::referrer"- }- column "mat_pp_$initial_current_url" {- type = "String"- comment = "column_materializer::person_properties::$initial_current_url"- }- column "mat_most_recent_app_os" {- type = "String"- comment = "column_materializer::properties::most_recent_app_os"- }- column "mat_pp_hubspot_score" {- type = "String"- comment = "column_materializer::person_properties::hubspot_score"- }- column "mat_pp_id" {- type = "String"- comment = "column_materializer::person_properties::id"- }- column "mat_pp_$current_url" {- type = "String"- comment = "column_materializer::person_properties::$current_url"- }- column "mat_product_key" {- type = "String"- comment = "column_materializer::properties::product_key"- }- column "mat_Plan_type_and_filter" {- type = "String"- comment = "column_materializer::properties::Plan type and filter"- }- column "mat_$app_namespace" {- type = "String"- comment = "column_materializer::properties::$app_namespace"- }- column "mat_$os_name" {- type = "String"- comment = "column_materializer::properties::$os_name"- }- column "mat_pp_$os_name" {- type = "String"- comment = "column_materializer::person_properties::$os_name::disabled"- }- column "mat_pp_$app_version" {- type = "String"- comment = "column_materializer::person_properties::$app_version"- }- column "mat_subscriptionStatus" {- type = "String"- comment = "column_materializer::properties::subscriptionStatus"- }- column "mat_$screen_height" {- type = "String"- comment = "column_materializer::properties::$screen_height"- }- column "mat_$screen_width" {- type = "String"- comment = "column_materializer::properties::$screen_width"- }- column "mat_tag" {- type = "String"- comment = "column_materializer::properties::tag"- }- column "mat_$app_build" {- type = "String"- comment = "column_materializer::properties::$app_build"- }- column "mat_surface_tag" {- type = "String"- comment = "column_materializer::properties::surface_tag"- }- column "mat_survey_responses_count_in_period" {- type = "String"- comment = "column_materializer::properties::survey_responses_count_in_period"- }- column "mat_event_count_in_month" {- type = "String"- comment = "column_materializer::properties::event_count_in_month"- }- column "mat_ramp" {- type = "String"- comment = "column_materializer::properties::ramp"- }- column "mat_auto_chapters" {- type = "String"- comment = "column_materializer::properties::auto_chapters"- }- column "mat_sentiment_analysis" {- type = "String"- comment = "column_materializer::properties::sentiment_analysis"- }- column "mat_redact_pii" {- type = "String"- comment = "column_materializer::properties::redact_pii"- }- column "mat_content_safety" {- type = "String"- comment = "column_materializer::properties::content_safety"- }- column "mat_iab_categories" {- type = "String"- comment = "column_materializer::properties::iab_categories"- }- column "mat_auto_highlights" {- type = "String"- comment = "column_materializer::properties::auto_highlights"- }- column "mat_entity_detection" {- type = "String"- comment = "column_materializer::properties::entity_detection"- }- column "mat_summarization" {- type = "String"- comment = "column_materializer::properties::summarization"- }- column "mat_pp_val_region" {- type = "String"- comment = "column_materializer::person_properties::val_region"- }- column "mat_client_id" {- type = "String"- comment = "column_materializer::properties::client_id"- }- column "mat_$geoip_country_code" {- type = "String"- comment = "column_materializer::properties::$geoip_country_code"- }- column "mat_disfluencies" {- type = "String"- comment = "column_materializer::properties::disfluencies"- }- column "mat_filter_profanity" {- type = "String"- comment = "column_materializer::properties::filter_profanity"- }- column "mat_speaker_labels" {- type = "String"- comment = "column_materializer::properties::speaker_labels"- }- column "mat_language_detection" {- type = "String"- comment = "column_materializer::properties::language_detection"- }- column "mat_product_analytics_projected_amount" {- type = "String"- comment = "column_materializer::properties::product_analytics_projected_amount"- }- column "mat_recordings_projected_amount" {- type = "String"- comment = "column_materializer::properties::recordings_projected_amount"- }- column "mat_events_projected_amount" {- type = "String"- comment = "column_materializer::properties::events_projected_amount"- }- column "mat_session_replay_projected_amount" {- type = "String"- comment = "column_materializer::properties::session_replay_projected_amount"- }- column "mat_total_usd" {- type = "String"- comment = "column_materializer::properties::total_usd"- }- column "mat_stripe_amount_paid" {- type = "String"- comment = "column_materializer::properties::stripe_amount_paid"- }- column "mat_workspace" {- type = "String"- comment = "column_materializer::properties::workspace"- }- column "mat_created_at" {- type = "String"- comment = "column_materializer::properties::created_at"- }- column "mat_kind" {- type = "String"- comment = "column_materializer::properties::kind"- }- column "mat_product" {- type = "String"- comment = "column_materializer::properties::product"- }- column "mat_message" {- type = "String"- comment = "column_materializer::properties::message"- }- column "mat_initiator" {- type = "String"- comment = "column_materializer::properties::initiator"- }- column "mat_query" {- type = "String"- comment = "column_materializer::properties::query"- }- column "mat_$survey_id" {- type = "String"- comment = "column_materializer::properties::$survey_id"- }- column "mat_$survey_response_1" {- type = "String"- comment = "column_materializer::properties::$survey_response_1"- }- column "mat_ticketId" {- type = "String"- comment = "column_materializer::properties::ticketId"- }- column "mat_$survey_response" {- type = "String"- comment = "column_materializer::properties::$survey_response"- }- column "mat_conceptName" {- type = "String"- comment = "column_materializer::properties::conceptName"- }- column "mat_apiName" {- type = "String"- comment = "column_materializer::properties::apiName"- }- column "mat_workplace_billing_plan" {- type = "String"- comment = "column_materializer::properties::workplace_billing_plan"- }- column "mat_$el_text" {- type = "String"- comment = "column_materializer::properties::$el_text"- }- column "mat_recording_count_in_period" {- type = "String"- comment = "column_materializer::properties::recording_count_in_period"- }- column "mat_$os_version" {- type = "String"- comment = "column_materializer::properties::$os_version"- }- column "mat_orderId" {- type = "String"- comment = "column_materializer::properties::orderId"- }- column "mat_commit_sha" {- type = "String"- comment = "column_materializer::properties::commit_sha"- }- column "mat_$feature_flag_payloads" {- type = "String"- comment = "column_materializer::properties::$feature_flag_payloads"- }- column "mat_event_count_in_period" {- type = "String"- comment = "column_materializer::properties::event_count_in_period"- }- column "mat_$groups" {- type = "String"- comment = "column_materializer::properties::$groups"- }- column "mat_$feature_flag" {- type = "String"- comment = "column_materializer::properties::$feature_flag"- }- column "mat_utm_content" {- type = "String"- comment = "column_materializer::properties::utm_content"- }- column "mat_gclid" {- type = "String"- comment = "column_materializer::properties::gclid"- }- column "mat_gad_source" {- type = "String"- comment = "column_materializer::properties::gad_source"- }- column "mat_gbraid" {- type = "String"- comment = "column_materializer::properties::gbraid"- }- column "mat_wbraid" {- type = "String"- comment = "column_materializer::properties::wbraid"- }- column "mat_fbclid" {- type = "String"- comment = "column_materializer::properties::fbclid"- }- column "mat_msclkid" {- type = "String"- comment = "column_materializer::properties::msclkid"- }- column "mat_organization_id" {- type = "String"- comment = "column_materializer::properties::organization_id"- }- column "mat_owner_type" {- type = "String"- comment = "column_materializer::properties::owner_type"- }- column "mat_device_type" {- type = "String"- comment = "column_materializer::properties::device_type"- }- column "mat_$device_id" {- type = "String"- comment = "column_materializer::properties::$device_id"- }- column "mat_pp_$geoip_continent_name" {- type = "String"- comment = "column_materializer::person_properties::$geoip_continent_name"- }- column "mat_$feature_flag_response" {- type = "String"- comment = "column_materializer::properties::$feature_flag_response"- }- column "mat_pp_utm_source" {- type = "String"- comment = "column_materializer::person_properties::utm_source"- }- column "mat_pp_$referring_domain" {- type = "String"- comment = "column_materializer::person_properties::$referring_domain"- }- column "mat_pp_Email_Domain" {- type = "String"- comment = "column_materializer::person_properties::Email Domain"- }- column "mat_machine_id" {- type = "String"- comment = "column_materializer::properties::machine_id"- }- column "mat_user_email_domain" {- type = "String"- comment = "column_materializer::properties::user_email_domain"- }- column "mat_$lib_version__minor" {- type = "String"- comment = "column_materializer::properties::$lib_version__minor"- }- column "mat_region" {- type = "String"- comment = "column_materializer::properties::region"- }- column "mat_pp_user_email_domain" {- type = "String"- comment = "column_materializer::person_properties::user_email_domain"- }- column "mat_url_promotion_id" {- type = "String"- comment = "column_materializer::properties::url_promotion_id"- }- column "mat_$lib_custom_api_host" {- type = "String"- comment = "column_materializer::properties::$lib_custom_api_host"- }- column "person_mode" {- type = "Enum8('full'=0, 'propertyless'=1, 'force_upgrade'=2)"- }- column "mat_user_platform" {- type = "String"- comment = "column_materializer::properties::user_platform"- }- column "mat_pp_$geoip_country_name" {- type = "String"- comment = "column_materializer::person_properties::$geoip_country_name"- }- column "mat_environment" {- type = "String"- comment = "column_materializer::properties::environment"- }- column "mat_customer_email" {- type = "String"- comment = "column_materializer::properties::customer_email"- }- column "mat_client_name" {- type = "String"- comment = "column_materializer::properties::client_name"- }- column "mat_screen_name" {- type = "String"- comment = "column_materializer::properties::screen_name"- }- column "mat_app_version" {- type = "String"- comment = "column_materializer::properties::app_version"- }- column "elements_chain_href" {- type = "String"- comment = "column_materializer::elements_chain::href"- }- column "elements_chain_texts" {- type = "Array(String)"- comment = "column_materializer::elements_chain::texts"- }- column "elements_chain_ids" {- type = "Array(String)"- comment = "column_materializer::elements_chain::ids"- }- column "elements_chain_elements" {- type = "Array(Enum8('a'=1, 'button'=2, 'form'=3, 'input'=4, 'select'=5, 'textarea'=6, 'label'=7))"- comment = "column_materializer::elements_chain::elements"- }- column "properties_group_custom" {- type = "Map(String, String)"- }- column "properties_group_feature_flags" {- type = "Map(String, String)"- }- column "is_deleted" {- type = "Bool"- }- column "mat_subdomain" {- type = "String"- comment = "column_materializer::properties::subdomain"- }- column "mat_$device" {- type = "String"- comment = "column_materializer::properties::$device"- }- column "mat_id" {- type = "String"- comment = "column_materializer::properties::id"- }- column "mat_record_id" {- type = "String"- comment = "column_materializer::properties::record_id"- }- column "mat_referrer_id" {- type = "String"- comment = "column_materializer::properties::record_id"- }- column "mat_$exception_issue_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_issue_id"- }- column "mat_$exception_fingerprint" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_fingerprint"- }- column "mat_$web_vitals_LCP_value" {- type = "Nullable(String)"- comment = "column_materializer::properties::$web_vitals_LCP_value"- }- column "mat_$web_vitals_FCP_value" {- type = "Nullable(String)"- comment = "column_materializer::properties::$web_vitals_FCP_value"- }- column "mat_$web_vitals_CLS_value" {- type = "Nullable(String)"- comment = "column_materializer::properties::$web_vitals_CLS_value"- }- column "mat_$web_vitals_INP_value" {- type = "Nullable(String)"- comment = "column_materializer::properties::$web_vitals_INP_value"- }- column "mat_$viewport_width" {- type = "Nullable(String)"- comment = "column_materializer::properties::$viewport_width"- }- column "mat_$viewport_height" {- type = "Nullable(String)"- comment = "column_materializer::properties::$viewport_height"- }- column "mat_$anon_distinct_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$anon_distinct_id"- }- column "person_properties_map_custom" {- type = "Map(String, String)"- }- column "mat_$ai_trace_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_trace_id"- }- column "mat_$ai_model" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_model"- }- column "mat_$ai_provider" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_provider"- }- column "mat_$ai_parent_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_parent_id"- }- column "mat_$ai_span_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_span_id"- }- column "mat_$ai_http_status" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_http_status"- }- column "mat_$exception_types" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_types"- }- column "mat_$exception_values" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_values"- }- column "mat_$exception_sources" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_sources"- }- column "mat_$exception_functions" {- type = "Nullable(String)"- comment = "column_materializer::properties::$exception_functions"- }- column "$session_id_uuid" {- type = "Nullable(UInt128)"- }- column "mat_$process_person_profile" {- type = "Nullable(String)"- comment = "column_materializer::properties::$process_person_profile"- }- column "consumer_breadcrumbs" {- type = "Array(String)"- }- column "properties_group_ai" {- type = "Map(String, String)"- }- column "mat_$is_identified" {- type = "Nullable(String)"- comment = "column_materializer::properties::$is_identified"- }- column "mat_historical_migration" {- type = "Nullable(String)"- comment = "column_materializer::properties::historical_migration"- }- column "mat_$ai_session_id" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_session_id"- }- column "mat_$ai_is_error" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_is_error"- }- column "dmat_string_0" {- type = "Nullable(String)"- }- column "dmat_string_1" {- type = "Nullable(String)"- }- column "dmat_string_2" {- type = "Nullable(String)"- }- column "dmat_string_3" {- type = "Nullable(String)"- }- column "dmat_string_4" {- type = "Nullable(String)"- }- column "dmat_string_5" {- type = "Nullable(String)"- }- column "dmat_string_6" {- type = "Nullable(String)"- }- column "dmat_string_7" {- type = "Nullable(String)"- }- column "dmat_string_8" {- type = "Nullable(String)"- }- column "dmat_string_9" {- type = "Nullable(String)"- }- column "dmat_numeric_0" {- type = "Nullable(Float64)"- }- column "dmat_numeric_1" {- type = "Nullable(Float64)"- }- column "dmat_numeric_2" {- type = "Nullable(Float64)"- }- column "dmat_numeric_3" {- type = "Nullable(Float64)"- }- column "dmat_numeric_4" {- type = "Nullable(Float64)"- }- column "dmat_numeric_5" {- type = "Nullable(Float64)"- }- column "dmat_numeric_6" {- type = "Nullable(Float64)"- }- column "dmat_numeric_7" {- type = "Nullable(Float64)"- }- column "dmat_numeric_8" {- type = "Nullable(Float64)"- }- column "dmat_numeric_9" {- type = "Nullable(Float64)"- }- column "dmat_bool_0" {- type = "Nullable(UInt8)"- }- column "dmat_bool_1" {- type = "Nullable(UInt8)"- }- column "dmat_bool_2" {- type = "Nullable(UInt8)"- }- column "dmat_bool_3" {- type = "Nullable(UInt8)"- }- column "dmat_bool_4" {- type = "Nullable(UInt8)"- }- column "dmat_bool_5" {- type = "Nullable(UInt8)"- }- column "dmat_bool_6" {- type = "Nullable(UInt8)"- }- column "dmat_bool_7" {- type = "Nullable(UInt8)"- }- column "dmat_bool_8" {- type = "Nullable(UInt8)"- }- column "dmat_bool_9" {- type = "Nullable(UInt8)"- }- column "dmat_datetime_0" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_1" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_2" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_3" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_4" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_5" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_6" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_7" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_8" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "dmat_datetime_9" {- type = "Nullable(DateTime64(6, 'UTC'))"- }- column "historical_migration" {- type = "Bool"- }- column "mat_$ai_total_cost_usd" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_total_cost_usd"- }- column "properties_group_ai_large" {- type = "Map(String, String)"- }- column "mat_$ai_prompt_name" {- type = "Nullable(String)"- comment = "column_materializer::properties::$ai_prompt_name"- }- engine "distributed" {- cluster_name = "posthog"- remote_database = "posthog"- remote_table = "sharded_events"- sharding_key = "sipHash64(distinct_id)"- }- }- table "raw_sessions_v3" {- order_by = ["team_id", "session_timestamp", "session_id_v7"]- partition_by = "toYYYYMM(session_timestamp)"- settings = {- index_granularity = "8192"- }- column "team_id" {- type = "Int64"- }- column "session_id_v7" {- type = "UInt128"- }- column "session_timestamp" {- type = "DateTime64(3)"- default = "fromUnixTimestamp64Milli(toUInt64(bitShiftRight(session_id_v7, 80)))"- }- column "distinct_id" {- type = "AggregateFunction(argMax, String, DateTime64(6, 'UTC'))"- }- column "distinct_ids" {- type = "AggregateFunction(groupUniqArray, String)"- }- column "min_timestamp" {- type = "SimpleAggregateFunction(min, DateTime64(6, 'UTC'))"- }- column "max_timestamp" {- type = "SimpleAggregateFunction(max, DateTime64(6, 'UTC'))"- }- column "max_inserted_at" {- type = "SimpleAggregateFunction(max, DateTime64(6, 'UTC'))"- }- column "urls" {- type = "SimpleAggregateFunction(groupUniqArrayArray(2000), Array(String))"- }- column "entry_url" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "end_url" {- type = "AggregateFunction(argMax, Nullable(String), DateTime64(6, 'UTC'))"- }- column "last_external_click_url" {- type = "AggregateFunction(argMax, Nullable(String), DateTime64(6, 'UTC'))"- }- column "browser" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "browser_version" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "os" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "os_version" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "device_type" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "viewport_width" {- type = "AggregateFunction(argMin, Nullable(Int64), DateTime64(6, 'UTC'))"- }- column "viewport_height" {- type = "AggregateFunction(argMin, Nullable(Int64), DateTime64(6, 'UTC'))"- }- column "geoip_country_code" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "geoip_subdivision_1_code" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "geoip_subdivision_1_name" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "geoip_subdivision_city_name" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "geoip_time_zone" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_referring_domain" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_utm_source" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_utm_campaign" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_utm_medium" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_utm_term" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_utm_content" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_gclid" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_gad_source" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_fbclid" {- type = "AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC'))"- }- column "entry_has_gclid" {- type = "AggregateFunction(argMin, Bool, DateTime64(6, 'UTC'))"- }- column "entry_has_fbclid" {- type = "AggregateFunction(argMin, Bool, DateTime64(6, 'UTC'))"- }- column "entry_ad_ids_map" {- type = "AggregateFunction(argMin, Map(String, String), DateTime64(6, 'UTC'))"- }- column "entry_ad_ids_set" {- type = "AggregateFunction(argMin, Array(String), DateTime64(6, 'UTC'))"- }- column "entry_channel_type_properties" {- type = "AggregateFunction(argMin, Tuple(Nullable(String), Nullable(String), Nullable(String), Nullable(String), Bool, Bool, Nullable(String)), DateTime64(6, 'UTC'))"- }- column "pageview_uniq" {- type = "AggregateFunction(uniqExact, Nullable(UUID))"- }- column "autocapture_uniq" {- type = "AggregateFunction(uniqExact, Nullable(UUID))"- }- column "screen_uniq" {- type = "AggregateFunction(uniqExact, Nullable(UUID))"- }- column "page_screen_uniq_up_to" {- type = "AggregateFunction(uniqUpTo(1), Nullable(UUID))"- }- column "has_autocapture" {- type = "SimpleAggregateFunction(max, Bool)"- }- column "flag_values" {- type = "AggregateFunction(groupUniqArrayMap, Map(String, String))"- }- column "flag_keys" {- type = "SimpleAggregateFunction(groupUniqArrayArray, Array(String))"- }- column "event_names" {- type = "SimpleAggregateFunction(groupUniqArrayArray, Array(String))"- }- column "hosts" {- type = "SimpleAggregateFunction(groupUniqArrayArray(100), Array(String))"- }- column "emails" {- type = "SimpleAggregateFunction(groupUniqArrayArray(10), Array(String))"- }- column "has_replay_events" {- type = "SimpleAggregateFunction(max, Bool)"- }- index "event_names_bloom_filter" {- expr = "event_names"- type = "bloom_filter()"- granularity = 1- }- index "flag_keys_bloom_filter" {- expr = "flag_keys"- type = "bloom_filter()"- granularity = 1- }- engine "aggregating_merge_tree" {- }- }- table "query_log_archive_old_ops" {- column "hostname" {- type = "LowCardinality(String)"- }- column "user" {- type = "LowCardinality(String)"- }- column "query_id" {- type = "String"- }- column "initial_query_id" {- type = "String"- }- column "is_initial_query" {- type = "UInt8"- }- column "type" {- type = "Enum8('QueryStart'=1, 'QueryFinish'=2, 'ExceptionBeforeStart'=3, 'ExceptionWhileProcessing'=4)"- }- column "event_date" {- type = "Date"- }- column "event_time" {- type = "DateTime"- }- column "event_time_microseconds" {- type = "DateTime64(6)"- }- column "query_start_time" {- type = "DateTime"- }- column "query_start_time_microseconds" {- type = "DateTime64(6)"- }- column "query_duration_ms" {- type = "UInt64"- }- column "read_rows" {- type = "UInt64"- }- column "read_bytes" {- type = "UInt64"- }- column "written_rows" {- type = "UInt64"- }- column "written_bytes" {- type = "UInt64"- }- column "result_rows" {- type = "UInt64"- }- column "result_bytes" {- type = "UInt64"- }- column "memory_usage" {- type = "UInt64"- }- column "peak_threads_usage" {- type = "UInt64"- }- column "current_database" {- type = "LowCardinality(String)"- }- column "query" {- type = "String"- }- column "formatted_query" {- type = "String"- }- column "normalized_query_hash" {- type = "UInt64"- }- column "query_kind" {- type = "LowCardinality(String)"- }- column "exception_code" {- type = "Int32"- }- column "exception_name" {- type = "String"- alias = "errorCodeToName(exception_code)"- }- column "exception" {- type = "String"- }- column "stack_trace" {- type = "String"- }- column "ProfileEvents_RealTimeMicroseconds" {- type = "Int64"- }- column "ProfileEvents_OSCPUVirtualTimeMicroseconds" {- type = "Int64"- }- column "ProfileEvents_S3Clients" {- type = "Int64"- }- column "ProfileEvents_S3DeleteObjects" {- type = "Int64"- }- column "ProfileEvents_S3CopyObject" {- type = "Int64"- }- column "ProfileEvents_S3ListObjects" {- type = "Int64"- }- column "ProfileEvents_S3HeadObject" {- type = "Int64"- }- column "ProfileEvents_S3GetObjectAttributes" {- type = "Int64"- }- column "ProfileEvents_S3CreateMultipartUpload" {- type = "Int64"- }- column "ProfileEvents_S3UploadPartCopy" {- type = "Int64"- }- column "ProfileEvents_S3UploadPart" {- type = "Int64"- }- column "ProfileEvents_S3AbortMultipartUpload" {- type = "Int64"- }- column "ProfileEvents_S3CompleteMultipartUpload" {- type = "Int64"- }- column "ProfileEvents_S3PutObject" {- type = "Int64"- }- column "ProfileEvents_S3GetObject" {- type = "Int64"- }- column "ProfileEvents_ReadBufferFromS3Bytes" {- type = "Int64"- }- column "ProfileEvents_WriteBufferFromS3Bytes" {- type = "Int64"- }- column "ProfileEvents" {- type = "Map(String, UInt64)"- }- column "lc_workflow" {- type = "LowCardinality(String)"- }- column "lc_kind" {- type = "LowCardinality(String)"- }- column "lc_id" {- type = "String"- }- column "lc_route_id" {- type = "String"- }- column "lc_access_method" {- type = "LowCardinality(String)"- }- column "lc_api_key_label" {- type = "String"- }- column "lc_api_key_mask" {- type = "String"- }- column "lc_query_type" {- type = "LowCardinality(String)"- }- column "lc_product" {- type = "LowCardinality(String)"- }- column "lc_chargeable" {- type = "Bool"- }- column "lc_name" {- type = "String"- }- column "lc_request_name" {- type = "String"- }- column "lc_client_query_id" {- type = "String"- }- column "lc_org_id" {- type = "String"- }- column "team_id" {- type = "Int64"- }- column "lc_user_id" {- type = "Int64"- }- column "lc_is_impersonated" {- type = "Bool"- }- column "lc_session_id" {- type = "String"- }- column "lc_dashboard_id" {- type = "Int64"- }- column "lc_insight_id" {- type = "Int64"- }- column "lc_cohort_id" {- type = "Int64"- }- column "lc_batch_export_id" {- type = "String"- }- column "lc_experiment_id" {- type = "Int64"- }- column "lc_experiment_feature_flag_key" {- type = "String"- }- column "lc_alert_config_id" {- type = "String"- }- column "lc_feature" {- type = "LowCardinality(String)"- }- column "lc_table_id" {- type = "String"- }- column "lc_warehouse_query" {- type = "Bool"- }- column "lc_person_on_events_mode" {- type = "LowCardinality(String)"- }- column "lc_service_name" {- type = "String"- }- column "lc_workload" {- type = "LowCardinality(String)"- }- column "lc_query__kind" {- type = "LowCardinality(String)"- }- column "lc_query__query" {- type = "String"- }- column "lc_query" {- type = "String"- }- column "lc_temporal__workflow_namespace" {- type = "String"- }- column "lc_temporal__workflow_type" {- type = "String"- }- column "lc_temporal__workflow_id" {- type = "String"- }- column "lc_temporal__workflow_run_id" {- type = "String"- }- column "lc_temporal__activity_type" {- type = "String"- }- column "lc_temporal__activity_id" {- type = "String"- }- column "lc_temporal__attempt" {- type = "Int64"- }- column "lc_dagster__job_name" {- type = "String"- }- column "lc_dagster__run_id" {- type = "String"- }- column "lc_dagster__owner" {- type = "String"- }- column "lc_modifiers" {- type = "String"- }- engine "distributed" {- cluster_name = "ops"- remote_database = "posthog"- remote_table = "query_log_archive_old"- }- }-}diff --git a/posthog/clickhouse/hcl/sql/prod-us/sessionsv3.sql b/posthog/clickhouse/hcl/sql/prod-us/sessionsv3.sqldeleted file mode 100644index 0b03cc81d3f2..000000000000--- a/posthog/clickhouse/hcl/sql/prod-us/sessionsv3.sql+++ /dev/null@@ -1,798 +0,0 @@--- AUTO-GENERATED from the declarative HCL by ops/gen-sql.sh — do not edit.--- Full CREATE schema for the prod-us/sessionsv3 node. Apply to a fresh ClickHouse to build it.--CREATE TABLE posthog.events (- uuid UUID,- event String,- properties String,- timestamp DateTime64(6, 'UTC'),- team_id Int64,- distinct_id String,- elements_hash String,- created_at DateTime64(6, 'UTC'),- _timestamp DateTime,- _offset UInt64,- elements_chain String,- mat_$user_id String COMMENT 'column_materializer::$user_id',- mat_$browser String COMMENT 'column_materializer::$browser',- mat_$host String COMMENT 'column_materializer::$host',- mat_$current_url String COMMENT 'column_materializer::$current_url',- mat_distinct_id String COMMENT 'column_materializer::distinct_id',- mat_action String COMMENT 'column_materializer::action',- mat_origin String COMMENT 'column_materializer::origin',- mat_email String COMMENT 'column_materializer::email',- mat_key String COMMENT 'column_materializer::key',- mat_insight String COMMENT 'column_materializer::insight',- mat_$event_type String COMMENT 'column_materializer::$event_type',- mat_created_by String COMMENT 'column_materializer::created_by',- mat_total_event_actions_count String COMMENT 'column_materializer::total_event_actions_count',- mat_is_demo_project String COMMENT 'column_materializer::is_demo_project',- mat_$active_feature_flags String COMMENT 'column_materializer::$active_feature_flags',- mat_filters_count String COMMENT 'column_materializer::filters_count',- mat_utm_source String COMMENT 'column_materializer::utm_source',- mat_apiErrorMessage String COMMENT 'column_materializer::apiErrorMessage',- mat_$referring_domain String COMMENT 'column_materializer::$referring_domain',- mat_statusCode String COMMENT 'column_materializer::statusCode',- mat_deal_id String COMMENT 'column_materializer::deal_id',- mat_realm String COMMENT 'column_materializer::realm',- $group_0 String COMMENT 'column_materializer::$group_0',- $group_1 String COMMENT 'column_materializer::$group_1',- $group_2 String COMMENT 'column_materializer::$group_2',- $group_3 String COMMENT 'column_materializer::$group_3',- $group_4 String COMMENT 'column_materializer::$group_4',- mat_$lib String COMMENT 'column_materializer::$lib',- mat_$os String COMMENT 'column_materializer::$os',- mat_$initial_referrer String COMMENT 'column_materializer::$initial_referrer',- mat_$app_version String COMMENT 'column_materializer::$app_version',- mat_$initial_referring_domain String COMMENT 'column_materializer::$initial_referring_domain',- mat_symbol String COMMENT 'column_materializer::symbol',- mat_page String COMMENT 'column_materializer::page',- mat_type String COMMENT 'column_materializer::type',- mat_currentScreen String COMMENT 'column_materializer::currentScreen',- mat_utm_campaign String COMMENT 'column_materializer::utm_campaign',- mat_is_organization_first_user String COMMENT 'column_materializer::is_organization_first_user',- mat_is_first_component_load String COMMENT 'column_materializer::is_first_component_load',- mat_team String COMMENT 'column_materializer::team',- mat_context String COMMENT 'column_materializer::context',- mat_sdk String COMMENT 'column_materializer::sdk',- mat_created_by_system String COMMENT 'column_materializer::created_by_system',- mat_item_count String COMMENT 'column_materializer::item_count',- mat_$ip String COMMENT 'column_materializer::$ip',- mat_$referrer String COMMENT 'column_materializer::$referrer',- mat_action_name String COMMENT 'column_materializer::action_name',- mat_$geoip_country_name String COMMENT 'column_materializer::$geoip_country_name',- mat_$device_model String COMMENT 'column_materializer::$device_model',- mat_progress String COMMENT 'column_materializer::progress',- mat_chain String COMMENT 'column_materializer::chain',- mat_$device_type String COMMENT 'column_materializer::$device_type',- mat_usd String COMMENT 'column_materializer::usd',- mat_app_name String COMMENT 'column_materializer::app_name',- mat_$screen_name String COMMENT 'column_materializer::$screen_name',- mat_index String COMMENT 'column_materializer::index',- mat_token String COMMENT 'column_materializer::token',- mat_method String COMMENT 'column_materializer::method',- mat_address String COMMENT 'column_materializer::address',- mat_name String COMMENT 'column_materializer::name',- mat_inviteCode String COMMENT 'column_materializer::inviteCode',- $window_id String COMMENT 'column_materializer::$window_id',- $session_id String COMMENT 'column_materializer::$session_id',- mat_osName String COMMENT 'column_materializer::osName',- mat_nativeBuildVersion String COMMENT 'column_materializer::nativeBuildVersion',- mat_revenue String COMMENT 'column_materializer::revenue',- group_0 String ALIAS `$group_0`,- group_1 String ALIAS `$group_1`,- group_2 String ALIAS `$group_2`,- group_3 String ALIAS `$group_3`,- group_4 String ALIAS `$group_4`,- alias_mat__user_id String ALIAS `mat_$user_id`,- alias_mat__browser String ALIAS `mat_$browser`,- alias_mat__host String ALIAS `mat_$host`,- alias_mat__current_url String ALIAS `mat_$current_url`,- alias_mat__event_type String ALIAS `mat_$event_type`,- alias_mat__active_feature_flags String ALIAS `mat_$active_feature_flags`,- alias_mat__referring_domain String ALIAS `mat_$referring_domain`,- alias_mat__lib String ALIAS `mat_$lib`,- alias_mat__os String ALIAS `mat_$os`,- alias_mat__initial_referrer String ALIAS `mat_$initial_referrer`,- alias_mat__app_version String ALIAS `mat_$app_version`,- alias_mat__initial_referring_domain String ALIAS `mat_$initial_referring_domain`,- alias_mat__ip String ALIAS `mat_$ip`,- alias_mat__referrer String ALIAS `mat_$referrer`,- alias_mat__geoip_country_name String ALIAS `mat_$geoip_country_name`,- alias_mat__device_model String ALIAS `mat_$device_model`,- alias_mat__device_type String ALIAS `mat_$device_type`,- alias_mat__screen_name String ALIAS `mat_$screen_name`,- person_id UUID,- person_properties String,- group0_properties String,- group1_properties String,- group2_properties String,- group3_properties String,- group4_properties String,- person_created_at DateTime64(3),- group0_created_at DateTime64(3),- group1_created_at DateTime64(3),- group2_created_at DateTime64(3),- group3_created_at DateTime64(3),- group4_created_at DateTime64(3),- mat_arguments String COMMENT 'column_materializer::properties::arguments',- mat_source String COMMENT 'column_materializer::properties::source',- mat_pp_email String COMMENT 'column_materializer::person_properties::email',- mat_$time String COMMENT 'column_materializer::properties::$time',- mat_$pathname String COMMENT 'column_materializer::properties::$pathname',- mat_$geoip_city_name String COMMENT 'column_materializer::properties::$geoip_city_name',- mat_community_id String COMMENT 'column_materializer::properties::community_id',- mat_thread_id String COMMENT 'column_materializer::properties::thread_id',- mat_Event_productCode String COMMENT 'column_materializer::properties::Event.productCode',- mat_env String COMMENT 'column_materializer::properties::env',- mat_target String COMMENT 'column_materializer::properties::target',- mat_Subscription_plan_amount String COMMENT 'column_materializer::properties::Subscription.plan.amount',- mat_title String COMMENT 'column_materializer::properties::title',- mat_Connection_app_name String COMMENT 'column_materializer::properties::Connection.app.name',- mat_utm_medium String COMMENT 'column_materializer::properties::utm_medium',- mat_Account_client_id String COMMENT 'column_materializer::properties::Account.client_id',- mat_HTTP_Method String COMMENT 'column_materializer::properties::HTTP Method',- mat_audio_duration String COMMENT 'column_materializer::properties::audio_duration',- mat_duration String COMMENT 'column_materializer::properties::duration',- mat_url String COMMENT 'column_materializer::properties::url',- mat_group_id String COMMENT 'column_materializer::properties::group_id',- mat_platform String COMMENT 'column_materializer::properties::platform',- mat_pp_$browser String COMMENT 'column_materializer::person_properties::$browser',- mat_payment_status String COMMENT 'column_materializer::properties::payment_status',- mat_testSessionId String COMMENT 'column_materializer::properties::testSessionId',- inserted_at Nullable(DateTime64(6, 'UTC')) DEFAULT now64(),- mat_$sent_at String COMMENT 'column_materializer::properties::$sent_at',- mat_pp_companyName String COMMENT 'column_materializer::person_properties::companyName',- mat_function String COMMENT 'column_materializer::properties::function',- mat_store_url String COMMENT 'column_materializer::properties::store_url',- mat_email_domain String COMMENT 'column_materializer::properties::email_domain',- mat_institution_name String COMMENT 'column_materializer::properties::institution_name',- mat_authentication_method String COMMENT 'column_materializer::properties::authentication_method',- mat_initial_step String COMMENT 'column_materializer::properties::initial_step',- mat_status_message String COMMENT 'column_materializer::properties::status_message',- mat_mode String COMMENT 'column_materializer::properties::mode',- mat_protocol String COMMENT 'column_materializer::properties::protocol',- mat_job_type String COMMENT 'column_materializer::properties::job_type',- mat_is_oauth String COMMENT 'column_materializer::properties::is_oauth',- mat_is_initial_aggregation String COMMENT 'column_materializer::properties::is_initial_aggregation',- mat_search_term String COMMENT 'column_materializer::properties::search_term',- mat_valid_ach_accounts String COMMENT 'column_materializer::properties::valid_ach_accounts',- mat_gross String COMMENT 'column_materializer::properties::gross',- mat_orderType String COMMENT 'column_materializer::properties::orderType',- mat_sku String COMMENT 'column_materializer::properties::sku',- mat_dual_channel String COMMENT 'column_materializer::properties::dual_channel',- mat_channel String COMMENT 'column_materializer::properties::channel',- mat_workspaceId String COMMENT 'column_materializer::properties::workspaceId',- mat_numberOfSecrets String COMMENT 'column_materializer::properties::numberOfSecrets',- mat_organizations String COMMENT 'column_materializer::properties::organizations',- mat_organization String COMMENT 'column_materializer::properties::organization',- mat_contributionError String COMMENT 'column_materializer::properties::contributionError',- mat_phone String COMMENT 'column_materializer::properties::phone',- mat_$initial_pathname String COMMENT 'column_materializer::properties::$initial_pathname',- mat_organization_name String COMMENT 'column_materializer::properties::organization_name',- mat_category String COMMENT 'column_materializer::properties::category',- mat_$lib_version String COMMENT 'column_materializer::properties::$lib_version',- mat_pp_$initial_utm_campaign String COMMENT 'column_materializer::person_properties::$initial_utm_campaign',- mat_pp_$initial_utm_medium String COMMENT 'column_materializer::person_properties::$initial_utm_medium',- mat_pp_$initial_gclid String COMMENT 'column_materializer::person_properties::$initial_gclid',- mat_pp_$initial_gad_source String COMMENT 'column_materializer::person_properties::$initial_gad_source',- mat_pp_$initial_utm_source String COMMENT 'column_materializer::person_properties::$initial_utm_source',- mat_pp_$initial_referring_domain String COMMENT 'column_materializer::person_properties::$initial_referring_domain',- mat_pp_$initial_utm_term String COMMENT 'column_materializer::person_properties::$initial_utm_term',- mat_pp_$initial_utm_content String COMMENT 'column_materializer::person_properties::$initial_utm_content',- mat_pp_$initial_gbraid String COMMENT 'column_materializer::person_properties::$initial_gbraid::disabled',- mat_pp_$initial_wbraid String COMMENT 'column_materializer::person_properties::$initial_wbraid::disabled',- mat_pp_$initial_msclkid String COMMENT 'column_materializer::person_properties::$initial_msclkid',- mat_pp_$initial_fbclid String COMMENT 'column_materializer::person_properties::$initial_fbclid',- mat_$geoip_subdivision_1_code String COMMENT 'column_materializer::properties::$geoip_subdivision_1_code',- mat_wlo_enabled String COMMENT 'column_materializer::properties::wlo_enabled',- mat_$prev_pageview_max_scroll_percentage String COMMENT 'column_materializer::properties::$prev_pageview_max_scroll_percentage',- mat_$prev_pageview_max_content_percentage String COMMENT 'column_materializer::properties::$prev_pageview_max_content_percentage',- mat_$prev_pageview_pathname String COMMENT 'column_materializer::properties::$prev_pageview_pathname',- mat_pp_$initial_pathname String COMMENT 'column_materializer::person_properties::$initial_pathname',- mat_pp_$geoip_country_code String COMMENT 'column_materializer::person_properties::$geoip_country_code',- mat_pp_username String COMMENT 'column_materializer::person_properties::username',- mat_pp_serverMasterclass String COMMENT 'column_materializer::person_properties::serverMasterclass',- mat_content_length String COMMENT 'column_materializer::properties::content_length',- mat_pp_serverMarketing String COMMENT 'column_materializer::person_properties::serverMarketing',- mat_$browser_version String COMMENT 'column_materializer::properties::$browser_version',- mat_pp_role String COMMENT 'column_materializer::person_properties::role',- mat_pp_customer String COMMENT 'column_materializer::person_properties::customer',- mat_event String COMMENT 'column_materializer::properties::event',- mat_disable_institution_search String COMMENT 'column_materializer::properties::disable_institution_search',- mat_is_first_event_for_user String COMMENT 'column_materializer::properties::is_first_event_for_user',- mat_current_member_guid String COMMENT 'column_materializer::properties::current_member_guid',- mat_user_agent String COMMENT 'column_materializer::properties::user_agent',- mat_is_test_user String COMMENT 'column_materializer::properties::is_test_user',- mat_referrer String COMMENT 'column_materializer::properties::referrer',- mat_pp_$initial_current_url String COMMENT 'column_materializer::person_properties::$initial_current_url',- mat_most_recent_app_os String COMMENT 'column_materializer::properties::most_recent_app_os',- mat_pp_hubspot_score String COMMENT 'column_materializer::person_properties::hubspot_score',- mat_pp_id String COMMENT 'column_materializer::person_properties::id',- mat_pp_$current_url String COMMENT 'column_materializer::person_properties::$current_url',- mat_product_key String COMMENT 'column_materializer::properties::product_key',- mat_Plan_type_and_filter String COMMENT 'column_materializer::properties::Plan type and filter',- mat_$app_namespace String COMMENT 'column_materializer::properties::$app_namespace',- mat_$os_name String COMMENT 'column_materializer::properties::$os_name',- mat_pp_$os_name String COMMENT 'column_materializer::person_properties::$os_name::disabled',- mat_pp_$app_version String COMMENT 'column_materializer::person_properties::$app_version',- mat_subscriptionStatus String COMMENT 'column_materializer::properties::subscriptionStatus',- mat_$screen_height String COMMENT 'column_materializer::properties::$screen_height',- mat_$screen_width String COMMENT 'column_materializer::properties::$screen_width',- mat_tag String COMMENT 'column_materializer::properties::tag',- mat_$app_build String COMMENT 'column_materializer::properties::$app_build',- mat_surface_tag String COMMENT 'column_materializer::properties::surface_tag',- mat_survey_responses_count_in_period String COMMENT 'column_materializer::properties::survey_responses_count_in_period',- mat_event_count_in_month String COMMENT 'column_materializer::properties::event_count_in_month',- mat_ramp String COMMENT 'column_materializer::properties::ramp',- mat_auto_chapters String COMMENT 'column_materializer::properties::auto_chapters',- mat_sentiment_analysis String COMMENT 'column_materializer::properties::sentiment_analysis',- mat_redact_pii String COMMENT 'column_materializer::properties::redact_pii',- mat_content_safety String COMMENT 'column_materializer::properties::content_safety',- mat_iab_categories String COMMENT 'column_materializer::properties::iab_categories',- mat_auto_highlights String COMMENT 'column_materializer::properties::auto_highlights',- mat_entity_detection String COMMENT 'column_materializer::properties::entity_detection',- mat_summarization String COMMENT 'column_materializer::properties::summarization',- mat_pp_val_region String COMMENT 'column_materializer::person_properties::val_region',- mat_client_id String COMMENT 'column_materializer::properties::client_id',- mat_$geoip_country_code String COMMENT 'column_materializer::properties::$geoip_country_code',- mat_disfluencies String COMMENT 'column_materializer::properties::disfluencies',- mat_filter_profanity String COMMENT 'column_materializer::properties::filter_profanity',- mat_speaker_labels String COMMENT 'column_materializer::properties::speaker_labels',- mat_language_detection String COMMENT 'column_materializer::properties::language_detection',- mat_product_analytics_projected_amount String COMMENT 'column_materializer::properties::product_analytics_projected_amount',- mat_recordings_projected_amount String COMMENT 'column_materializer::properties::recordings_projected_amount',- mat_events_projected_amount String COMMENT 'column_materializer::properties::events_projected_amount',- mat_session_replay_projected_amount String COMMENT 'column_materializer::properties::session_replay_projected_amount',- mat_total_usd String COMMENT 'column_materializer::properties::total_usd',- mat_stripe_amount_paid String COMMENT 'column_materializer::properties::stripe_amount_paid',- mat_workspace String COMMENT 'column_materializer::properties::workspace',- mat_created_at String COMMENT 'column_materializer::properties::created_at',- mat_kind String COMMENT 'column_materializer::properties::kind',- mat_product String COMMENT 'column_materializer::properties::product',- mat_message String COMMENT 'column_materializer::properties::message',- mat_initiator String COMMENT 'column_materializer::properties::initiator',- mat_query String COMMENT 'column_materializer::properties::query',- mat_$survey_id String COMMENT 'column_materializer::properties::$survey_id',- mat_$survey_response_1 String COMMENT 'column_materializer::properties::$survey_response_1',- mat_ticketId String COMMENT 'column_materializer::properties::ticketId',- mat_$survey_response String COMMENT 'column_materializer::properties::$survey_response',- mat_conceptName String COMMENT 'column_materializer::properties::conceptName',- mat_apiName String COMMENT 'column_materializer::properties::apiName',- mat_workplace_billing_plan String COMMENT 'column_materializer::properties::workplace_billing_plan',- mat_$el_text String COMMENT 'column_materializer::properties::$el_text',- mat_recording_count_in_period String COMMENT 'column_materializer::properties::recording_count_in_period',- mat_$os_version String COMMENT 'column_materializer::properties::$os_version',- mat_orderId String COMMENT 'column_materializer::properties::orderId',- mat_commit_sha String COMMENT 'column_materializer::properties::commit_sha',- mat_$feature_flag_payloads String COMMENT 'column_materializer::properties::$feature_flag_payloads',- mat_event_count_in_period String COMMENT 'column_materializer::properties::event_count_in_period',- mat_$groups String COMMENT 'column_materializer::properties::$groups',- mat_$feature_flag String COMMENT 'column_materializer::properties::$feature_flag',- mat_utm_content String COMMENT 'column_materializer::properties::utm_content',- mat_gclid String COMMENT 'column_materializer::properties::gclid',- mat_gad_source String COMMENT 'column_materializer::properties::gad_source',- mat_gbraid String COMMENT 'column_materializer::properties::gbraid',- mat_wbraid String COMMENT 'column_materializer::properties::wbraid',- mat_fbclid String COMMENT 'column_materializer::properties::fbclid',- mat_msclkid String COMMENT 'column_materializer::properties::msclkid',- mat_organization_id String COMMENT 'column_materializer::properties::organization_id',- mat_owner_type String COMMENT 'column_materializer::properties::owner_type',- mat_device_type String COMMENT 'column_materializer::properties::device_type',- mat_$device_id String COMMENT 'column_materializer::properties::$device_id',- mat_pp_$geoip_continent_name String COMMENT 'column_materializer::person_properties::$geoip_continent_name',- mat_$feature_flag_response String COMMENT 'column_materializer::properties::$feature_flag_response',- mat_pp_utm_source String COMMENT 'column_materializer::person_properties::utm_source',- mat_pp_$referring_domain String COMMENT 'column_materializer::person_properties::$referring_domain',- mat_pp_Email_Domain String COMMENT 'column_materializer::person_properties::Email Domain',- mat_machine_id String COMMENT 'column_materializer::properties::machine_id',- mat_user_email_domain String COMMENT 'column_materializer::properties::user_email_domain',- mat_$lib_version__minor String COMMENT 'column_materializer::properties::$lib_version__minor',- mat_region String COMMENT 'column_materializer::properties::region',- mat_pp_user_email_domain String COMMENT 'column_materializer::person_properties::user_email_domain',- mat_url_promotion_id String COMMENT 'column_materializer::properties::url_promotion_id',- mat_$lib_custom_api_host String COMMENT 'column_materializer::properties::$lib_custom_api_host',- person_mode Enum8('full'=0, 'propertyless'=1, 'force_upgrade'=2),- mat_user_platform String COMMENT 'column_materializer::properties::user_platform',- mat_pp_$geoip_country_name String COMMENT 'column_materializer::person_properties::$geoip_country_name',- mat_environment String COMMENT 'column_materializer::properties::environment',- mat_customer_email String COMMENT 'column_materializer::properties::customer_email',- mat_client_name String COMMENT 'column_materializer::properties::client_name',- mat_screen_name String COMMENT 'column_materializer::properties::screen_name',- mat_app_version String COMMENT 'column_materializer::properties::app_version',- elements_chain_href String COMMENT 'column_materializer::elements_chain::href',- elements_chain_texts Array(String) COMMENT 'column_materializer::elements_chain::texts',- elements_chain_ids Array(String) COMMENT 'column_materializer::elements_chain::ids',- elements_chain_elements Array(Enum8('a'=1, 'button'=2, 'form'=3, 'input'=4, 'select'=5, 'textarea'=6, 'label'=7)) COMMENT 'column_materializer::elements_chain::elements',- properties_group_custom Map(String, String),- properties_group_feature_flags Map(String, String),- is_deleted Bool,- mat_subdomain String COMMENT 'column_materializer::properties::subdomain',- mat_$device String COMMENT 'column_materializer::properties::$device',- mat_id String COMMENT 'column_materializer::properties::id',- mat_record_id String COMMENT 'column_materializer::properties::record_id',- mat_referrer_id String COMMENT 'column_materializer::properties::record_id',- mat_$exception_issue_id Nullable(String) COMMENT 'column_materializer::properties::$exception_issue_id',- mat_$exception_fingerprint Nullable(String) COMMENT 'column_materializer::properties::$exception_fingerprint',- mat_$web_vitals_LCP_value Nullable(String) COMMENT 'column_materializer::properties::$web_vitals_LCP_value',- mat_$web_vitals_FCP_value Nullable(String) COMMENT 'column_materializer::properties::$web_vitals_FCP_value',- mat_$web_vitals_CLS_value Nullable(String) COMMENT 'column_materializer::properties::$web_vitals_CLS_value',- mat_$web_vitals_INP_value Nullable(String) COMMENT 'column_materializer::properties::$web_vitals_INP_value',- mat_$viewport_width Nullable(String) COMMENT 'column_materializer::properties::$viewport_width',- mat_$viewport_height Nullable(String) COMMENT 'column_materializer::properties::$viewport_height',- mat_$anon_distinct_id Nullable(String) COMMENT 'column_materializer::properties::$anon_distinct_id',- person_properties_map_custom Map(String, String),- mat_$ai_trace_id Nullable(String) COMMENT 'column_materializer::properties::$ai_trace_id',- mat_$ai_model Nullable(String) COMMENT 'column_materializer::properties::$ai_model',- mat_$ai_provider Nullable(String) COMMENT 'column_materializer::properties::$ai_provider',- mat_$ai_parent_id Nullable(String) COMMENT 'column_materializer::properties::$ai_parent_id',- mat_$ai_span_id Nullable(String) COMMENT 'column_materializer::properties::$ai_span_id',- mat_$ai_http_status Nullable(String) COMMENT 'column_materializer::properties::$ai_http_status',- mat_$exception_types Nullable(String) COMMENT 'column_materializer::properties::$exception_types',- mat_$exception_values Nullable(String) COMMENT 'column_materializer::properties::$exception_values',- mat_$exception_sources Nullable(String) COMMENT 'column_materializer::properties::$exception_sources',- mat_$exception_functions Nullable(String) COMMENT 'column_materializer::properties::$exception_functions',- $session_id_uuid Nullable(UInt128),- mat_$process_person_profile Nullable(String) COMMENT 'column_materializer::properties::$process_person_profile',- consumer_breadcrumbs Array(String),- properties_group_ai Map(String, String),- mat_$is_identified Nullable(String) COMMENT 'column_materializer::properties::$is_identified',- mat_historical_migration Nullable(String) COMMENT 'column_materializer::properties::historical_migration',- mat_$ai_session_id Nullable(String) COMMENT 'column_materializer::properties::$ai_session_id',- mat_$ai_is_error Nullable(String) COMMENT 'column_materializer::properties::$ai_is_error',- dmat_string_0 Nullable(String),- dmat_string_1 Nullable(String),- dmat_string_2 Nullable(String),- dmat_string_3 Nullable(String),- dmat_string_4 Nullable(String),- dmat_string_5 Nullable(String),- dmat_string_6 Nullable(String),- dmat_string_7 Nullable(String),- dmat_string_8 Nullable(String),- dmat_string_9 Nullable(String),- dmat_numeric_0 Nullable(Float64),- dmat_numeric_1 Nullable(Float64),- dmat_numeric_2 Nullable(Float64),- dmat_numeric_3 Nullable(Float64),- dmat_numeric_4 Nullable(Float64),- dmat_numeric_5 Nullable(Float64),- dmat_numeric_6 Nullable(Float64),- dmat_numeric_7 Nullable(Float64),- dmat_numeric_8 Nullable(Float64),- dmat_numeric_9 Nullable(Float64),- dmat_bool_0 Nullable(UInt8),- dmat_bool_1 Nullable(UInt8),- dmat_bool_2 Nullable(UInt8),- dmat_bool_3 Nullable(UInt8),- dmat_bool_4 Nullable(UInt8),- dmat_bool_5 Nullable(UInt8),- dmat_bool_6 Nullable(UInt8),- dmat_bool_7 Nullable(UInt8),- dmat_bool_8 Nullable(UInt8),- dmat_bool_9 Nullable(UInt8),- dmat_datetime_0 Nullable(DateTime64(6, 'UTC')),- dmat_datetime_1 Nullable(DateTime64(6, 'UTC')),- dmat_datetime_2 Nullable(DateTime64(6, 'UTC')),- dmat_datetime_3 Nullable(DateTime64(6, 'UTC')),- dmat_datetime_4 Nullable(DateTime64(6, 'UTC')),- dmat_datetime_5 Nullable(DateTime64(6, 'UTC')),- dmat_datetime_6 Nullable(DateTime64(6, 'UTC')),- dmat_datetime_7 Nullable(DateTime64(6, 'UTC')),- dmat_datetime_8 Nullable(DateTime64(6, 'UTC')),- dmat_datetime_9 Nullable(DateTime64(6, 'UTC')),- historical_migration Bool,- mat_$ai_total_cost_usd Nullable(String) COMMENT 'column_materializer::properties::$ai_total_cost_usd',- properties_group_ai_large Map(String, String),- mat_$ai_prompt_name Nullable(String) COMMENT 'column_materializer::properties::$ai_prompt_name'-) ENGINE = Distributed('posthog', 'posthog', 'sharded_events', sipHash64(distinct_id));-CREATE TABLE posthog.query_log_archive (- hostname LowCardinality(String),- user LowCardinality(String),- query_id String,- initial_query_id String,- is_initial_query UInt8,- type Enum8('QueryStart'=1, 'QueryFinish'=2, 'ExceptionBeforeStart'=3, 'ExceptionWhileProcessing'=4),- event_date Date,- event_time DateTime,- event_time_microseconds DateTime64(6),- query_start_time DateTime,- query_start_time_microseconds DateTime64(6),- query_duration_ms UInt64,- read_rows UInt64,- read_bytes UInt64,- written_rows UInt64,- written_bytes UInt64,- result_rows UInt64,- result_bytes UInt64,- memory_usage UInt64,- peak_threads_usage UInt64,- current_database LowCardinality(String),- query String,- formatted_query String,- normalized_query_hash UInt64,- query_kind LowCardinality(String),- exception_code Int32,- exception String,- stack_trace String,- team_id Int64,- log_comment JSON(max_dynamic_paths=256, access_method LowCardinality(String), alert_config_id String, api_key_label String, api_key_mask String, batch_export_id String, chargeable Bool, client_query_id String, cohort_id Int64, `dagster.job_name` String, `dagster.run_id` String, `dagster.tags.owner` String, dashboard_id Int64, experiment_feature_flag_key String, experiment_id Int64, feature LowCardinality(String), id String, insight_id Int64, is_impersonated Bool, kind LowCardinality(String), name String, org_id String, person_on_events_mode LowCardinality(String), product LowCardinality(String), query_type LowCardinality(String), request_name String, route_id String, service_name String, session_id String, table_id String, team_id Int64, `temporal.activity_id` String, `temporal.activity_type` String, `temporal.attempt` Int64, `temporal.workflow_id` String, `temporal.workflow_namespace` String, `temporal.workflow_run_id` String, `temporal.workflow_type` String, user_id Int64, warehouse_query Bool, workflow LowCardinality(String), workload LowCardinality(String), SKIP cache_key, SKIP filter, SKIP hogql_features, SKIP http_referer, SKIP http_request_id, SKIP http_user_agent, SKIP query_settings, SKIP timings, SKIP user_email),- ProfileEvents Map(String, UInt64),- exception_name String ALIAS errorCodeToName(exception_code),- ProfileEvents_RealTimeMicroseconds Int64 ALIAS ProfileEvents['RealTimeMicroseconds'],- ProfileEvents_OSCPUVirtualTimeMicroseconds Int64 ALIAS ProfileEvents['OSCPUVirtualTimeMicroseconds'],- ProfileEvents_S3Clients Int64 ALIAS ProfileEvents['S3Clients'],- ProfileEvents_S3DeleteObjects Int64 ALIAS ProfileEvents['S3DeleteObjects'],- ProfileEvents_S3CopyObject Int64 ALIAS ProfileEvents['S3CopyObject'],- ProfileEvents_S3ListObjects Int64 ALIAS ProfileEvents['S3ListObjects'],- ProfileEvents_S3HeadObject Int64 ALIAS ProfileEvents['S3HeadObject'],- ProfileEvents_S3GetObjectAttributes Int64 ALIAS ProfileEvents['S3GetObjectAttributes'],- ProfileEvents_S3CreateMultipartUpload Int64 ALIAS ProfileEvents['S3CreateMultipartUpload'],- ProfileEvents_S3UploadPartCopy Int64 ALIAS ProfileEvents['S3UploadPartCopy'],- ProfileEvents_S3UploadPart Int64 ALIAS ProfileEvents['S3UploadPart'],- ProfileEvents_S3AbortMultipartUpload Int64 ALIAS ProfileEvents['S3AbortMultipartUpload'],- ProfileEvents_S3CompleteMultipartUpload Int64 ALIAS ProfileEvents['S3CompleteMultipartUpload'],- ProfileEvents_S3PutObject Int64 ALIAS ProfileEvents['S3PutObject'],- ProfileEvents_S3GetObject Int64 ALIAS ProfileEvents['S3GetObject'],- ProfileEvents_ReadBufferFromS3Bytes Int64 ALIAS ProfileEvents['ReadBufferFromS3Bytes'],- ProfileEvents_WriteBufferFromS3Bytes Int64 ALIAS ProfileEvents['WriteBufferFromS3Bytes'],- lc_workflow LowCardinality(String) ALIAS log_comment.workflow,- lc_kind LowCardinality(String) ALIAS log_comment.kind,- lc_id String ALIAS CAST(log_comment.id, 'String'),- lc_route_id String ALIAS CAST(log_comment.route_id, 'String'),- lc_access_method LowCardinality(String) ALIAS log_comment.access_method,- lc_api_key_label String ALIAS CAST(log_comment.api_key_label, 'String'),- lc_api_key_mask String ALIAS CAST(log_comment.api_key_mask, 'String'),- lc_query_type LowCardinality(String) ALIAS log_comment.query_type,- lc_product LowCardinality(String) ALIAS log_comment.product,- lc_chargeable Bool ALIAS log_comment.chargeable,- lc_name String ALIAS CAST(log_comment.name, 'String'),- lc_request_name String ALIAS CAST(log_comment.request_name, 'String'),- lc_client_query_id String ALIAS CAST(log_comment.client_query_id, 'String'),- lc_org_id String ALIAS CAST(log_comment.org_id, 'String'),- lc_user_id Int64 ALIAS log_comment.user_id,- lc_is_impersonated Bool ALIAS log_comment.is_impersonated,- lc_session_id String ALIAS CAST(log_comment.session_id, 'String'),- lc_dashboard_id Int64 ALIAS log_comment.dashboard_id,- lc_insight_id Int64 ALIAS log_comment.insight_id,- lc_cohort_id Int64 ALIAS log_comment.cohort_id,- lc_batch_export_id String ALIAS CAST(log_comment.batch_export_id, 'String'),- lc_experiment_id Int64 ALIAS log_comment.experiment_id,- lc_experiment_feature_flag_key String ALIAS CAST(log_comment.experiment_feature_flag_key, 'String'),- lc_alert_config_id String ALIAS CAST(log_comment.alert_config_id, 'String'),- lc_feature LowCardinality(String) ALIAS log_comment.feature,- lc_table_id String ALIAS CAST(log_comment.table_id, 'String'),- lc_warehouse_query Bool ALIAS log_comment.warehouse_query,- lc_person_on_events_mode LowCardinality(String) ALIAS log_comment.person_on_events_mode,- lc_service_name String ALIAS CAST(log_comment.service_name, 'String'),- lc_workload LowCardinality(String) ALIAS log_comment.workload,- lc_query__kind LowCardinality(String) ALIAS if(JSONHas(toString(log_comment), 'query', 'source'), JSONExtractString(toString(log_comment), 'query', 'source', 'kind'), JSONExtractString(toString(log_comment), 'query', 'kind')),- lc_query__query String ALIAS multiIf(NOT is_initial_query, '', JSONHas(toString(log_comment), 'query', 'source'), JSONExtractString(toString(log_comment), 'query', 'source', 'query'), JSONExtractString(toString(log_comment), 'query', 'query')),- lc_query String ALIAS if(is_initial_query, JSONExtractRaw(toString(log_comment), 'query'), ''),- lc_temporal__workflow_namespace String ALIAS CAST(log_comment.`temporal.workflow_namespace`, 'String'),- lc_temporal__workflow_type String ALIAS CAST(log_comment.`temporal.workflow_type`, 'String'),- lc_temporal__workflow_id String ALIAS CAST(log_comment.`temporal.workflow_id`, 'String'),- lc_temporal__workflow_run_id String ALIAS CAST(log_comment.`temporal.workflow_run_id`, 'String'),- lc_temporal__activity_type String ALIAS CAST(log_comment.`temporal.activity_type`, 'String'),- lc_temporal__activity_id String ALIAS CAST(log_comment.`temporal.activity_id`, 'String'),- lc_temporal__attempt Int64 ALIAS log_comment.`temporal.attempt`,- lc_dagster__job_name String ALIAS CAST(log_comment.`dagster.job_name`, 'String'),- lc_dagster__run_id String ALIAS CAST(log_comment.`dagster.run_id`, 'String'),- lc_dagster__owner String ALIAS CAST(log_comment.`dagster.tags.owner`, 'String'),- lc_modifiers String ALIAS if(is_initial_query, JSONExtractRaw(toString(log_comment), 'modifiers'), '')-) ENGINE = Distributed('ops', 'posthog', 'sharded_query_log_archive');-CREATE TABLE posthog.query_log_archive_old_ops (- hostname LowCardinality(String),- user LowCardinality(String),- query_id String,- initial_query_id String,- is_initial_query UInt8,- type Enum8('QueryStart'=1, 'QueryFinish'=2, 'ExceptionBeforeStart'=3, 'ExceptionWhileProcessing'=4),- event_date Date,- event_time DateTime,- event_time_microseconds DateTime64(6),- query_start_time DateTime,- query_start_time_microseconds DateTime64(6),- query_duration_ms UInt64,- read_rows UInt64,- read_bytes UInt64,- written_rows UInt64,- written_bytes UInt64,- result_rows UInt64,- result_bytes UInt64,- memory_usage UInt64,- peak_threads_usage UInt64,- current_database LowCardinality(String),- query String,- formatted_query String,- normalized_query_hash UInt64,- query_kind LowCardinality(String),- exception_code Int32,- exception_name String ALIAS errorCodeToName(exception_code),- exception String,- stack_trace String,- ProfileEvents_RealTimeMicroseconds Int64,- ProfileEvents_OSCPUVirtualTimeMicroseconds Int64,- ProfileEvents_S3Clients Int64,- ProfileEvents_S3DeleteObjects Int64,- ProfileEvents_S3CopyObject Int64,- ProfileEvents_S3ListObjects Int64,- ProfileEvents_S3HeadObject Int64,- ProfileEvents_S3GetObjectAttributes Int64,- ProfileEvents_S3CreateMultipartUpload Int64,- ProfileEvents_S3UploadPartCopy Int64,- ProfileEvents_S3UploadPart Int64,- ProfileEvents_S3AbortMultipartUpload Int64,- ProfileEvents_S3CompleteMultipartUpload Int64,- ProfileEvents_S3PutObject Int64,- ProfileEvents_S3GetObject Int64,- ProfileEvents_ReadBufferFromS3Bytes Int64,- ProfileEvents_WriteBufferFromS3Bytes Int64,- ProfileEvents Map(String, UInt64),- lc_workflow LowCardinality(String),- lc_kind LowCardinality(String),- lc_id String,- lc_route_id String,- lc_access_method LowCardinality(String),- lc_api_key_label String,- lc_api_key_mask String,- lc_query_type LowCardinality(String),- lc_product LowCardinality(String),- lc_chargeable Bool,- lc_name String,- lc_request_name String,- lc_client_query_id String,- lc_org_id String,- team_id Int64,- lc_user_id Int64,- lc_is_impersonated Bool,- lc_session_id String,- lc_dashboard_id Int64,- lc_insight_id Int64,- lc_cohort_id Int64,- lc_batch_export_id String,- lc_experiment_id Int64,- lc_experiment_feature_flag_key String,- lc_alert_config_id String,- lc_feature LowCardinality(String),- lc_table_id String,- lc_warehouse_query Bool,- lc_person_on_events_mode LowCardinality(String),- lc_service_name String,- lc_workload LowCardinality(String),- lc_query__kind LowCardinality(String),- lc_query__query String,- lc_query String,- lc_temporal__workflow_namespace String,- lc_temporal__workflow_type String,- lc_temporal__workflow_id String,- lc_temporal__workflow_run_id String,- lc_temporal__activity_type String,- lc_temporal__activity_id String,- lc_temporal__attempt Int64,- lc_dagster__job_name String,- lc_dagster__run_id String,- lc_dagster__owner String,- lc_modifiers String-) ENGINE = Distributed('ops', 'posthog', 'query_log_archive_old');-CREATE TABLE posthog.raw_sessions_v3 (- team_id Int64,- session_id_v7 UInt128,- session_timestamp DateTime64(3) DEFAULT fromUnixTimestamp64Milli(toUInt64(bitShiftRight(session_id_v7, 80))),- distinct_id AggregateFunction(argMax, String, DateTime64(6, 'UTC')),- distinct_ids AggregateFunction(groupUniqArray, String),- min_timestamp SimpleAggregateFunction(min, DateTime64(6, 'UTC')),- max_timestamp SimpleAggregateFunction(max, DateTime64(6, 'UTC')),- max_inserted_at SimpleAggregateFunction(max, DateTime64(6, 'UTC')),- urls SimpleAggregateFunction(groupUniqArrayArray(2000), Array(String)),- entry_url AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- end_url AggregateFunction(argMax, Nullable(String), DateTime64(6, 'UTC')),- last_external_click_url AggregateFunction(argMax, Nullable(String), DateTime64(6, 'UTC')),- browser AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- browser_version AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- os AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- os_version AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- device_type AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- viewport_width AggregateFunction(argMin, Nullable(Int64), DateTime64(6, 'UTC')),- viewport_height AggregateFunction(argMin, Nullable(Int64), DateTime64(6, 'UTC')),- geoip_country_code AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- geoip_subdivision_1_code AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- geoip_subdivision_1_name AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- geoip_subdivision_city_name AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- geoip_time_zone AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- entry_referring_domain AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- entry_utm_source AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- entry_utm_campaign AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- entry_utm_medium AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- entry_utm_term AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- entry_utm_content AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- entry_gclid AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- entry_gad_source AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- entry_fbclid AggregateFunction(argMin, Nullable(String), DateTime64(6, 'UTC')),- entry_has_gclid AggregateFunction(argMin, Bool, DateTime64(6, 'UTC')),- entry_has_fbclid AggregateFunction(argMin, Bool, DateTime64(6, 'UTC')),- entry_ad_ids_map AggregateFunction(argMin, Map(String, String), DateTime64(6, 'UTC')),- entry_ad_ids_set AggregateFunction(argMin, Array(String), DateTime64(6, 'UTC')),- entry_channel_type_properties AggregateFunction(argMin, Tuple(Nullable(String), Nullable(String), Nullable(String), Nullable(String), Bool, Bool, Nullable(String)), DateTime64(6, 'UTC')),- pageview_uniq AggregateFunction(uniqExact, Nullable(UUID)),- autocapture_uniq AggregateFunction(uniqExact, Nullable(UUID)),- screen_uniq AggregateFunction(uniqExact, Nullable(UUID)),- page_screen_uniq_up_to AggregateFunction(uniqUpTo(1), Nullable(UUID)),- has_autocapture SimpleAggregateFunction(max, Bool),- flag_values AggregateFunction(groupUniqArrayMap, Map(String, String)),- flag_keys SimpleAggregateFunction(groupUniqArrayArray, Array(String)),- event_names SimpleAggregateFunction(groupUniqArrayArray, Array(String)),- hosts SimpleAggregateFunction(groupUniqArrayArray(100), Array(String)),- emails SimpleAggregateFunction(groupUniqArrayArray(10), Array(String)),- has_replay_events SimpleAggregateFunction(max, Bool),- INDEX event_names_bloom_filter event_names TYPE bloom_filter() GRANULARITY 1,- INDEX flag_keys_bloom_filter flag_keys TYPE bloom_filter() GRANULARITY 1-) ENGINE = AggregatingMergeTree() ORDER BY (team_id, session_timestamp, session_id_v7) PARTITION BY toYYYYMM(session_timestamp) SETTINGS index_granularity = 8192;-CREATE TABLE posthog.writable_query_log_archive (- hostname LowCardinality(String),- user LowCardinality(String),- query_id String,- initial_query_id String,- is_initial_query UInt8,- type Enum8('QueryStart'=1, 'QueryFinish'=2, 'ExceptionBeforeStart'=3, 'ExceptionWhileProcessing'=4),- event_date Date,- event_time DateTime,- event_time_microseconds DateTime64(6),- query_start_time DateTime,- query_start_time_microseconds DateTime64(6),- query_duration_ms UInt64,- read_rows UInt64,- read_bytes UInt64,- written_rows UInt64,- written_bytes UInt64,- result_rows UInt64,- result_bytes UInt64,- memory_usage UInt64,- peak_threads_usage UInt64,- current_database LowCardinality(String),- query String,- formatted_query String,- normalized_query_hash UInt64,- query_kind LowCardinality(String),- exception_code Int32,- exception String,- stack_trace String,- team_id Int64,- log_comment JSON(max_dynamic_paths=256, access_method LowCardinality(String), alert_config_id String, api_key_label String, api_key_mask String, batch_export_id String, chargeable Bool, client_query_id String, cohort_id Int64, `dagster.job_name` String, `dagster.run_id` String, `dagster.tags.owner` String, dashboard_id Int64, experiment_feature_flag_key String, experiment_id Int64, feature LowCardinality(String), id String, insight_id Int64, is_impersonated Bool, kind LowCardinality(String), name String, org_id String, person_on_events_mode LowCardinality(String), product LowCardinality(String), query_type LowCardinality(String), request_name String, route_id String, service_name String, session_id String, table_id String, team_id Int64, `temporal.activity_id` String, `temporal.activity_type` String, `temporal.attempt` Int64, `temporal.workflow_id` String, `temporal.workflow_namespace` String, `temporal.workflow_run_id` String, `temporal.workflow_type` String, user_id Int64, warehouse_query Bool, workflow LowCardinality(String), workload LowCardinality(String), SKIP cache_key, SKIP filter, SKIP hogql_features, SKIP http_referer, SKIP http_request_id, SKIP http_user_agent, SKIP query_settings, SKIP timings, SKIP user_email),- ProfileEvents Map(String, UInt64)-) ENGINE = Distributed('ops', 'posthog', 'query_log_archive_buffer');-CREATE MATERIALIZED VIEW posthog.ops_query_log_archive_mv TO posthog.writable_query_log_archive (hostname LowCardinality(String), user LowCardinality(String), query_id String, initial_query_id String, is_initial_query UInt8, type Enum8('QueryStart'=1, 'QueryFinish'=2, 'ExceptionBeforeStart'=3, 'ExceptionWhileProcessing'=4), event_date Date, event_time DateTime, event_time_microseconds DateTime64(6), query_start_time DateTime, query_start_time_microseconds DateTime64(6), query_duration_ms UInt64, read_rows UInt64, read_bytes UInt64, written_rows UInt64, written_bytes UInt64, result_rows UInt64, result_bytes UInt64, memory_usage UInt64, peak_threads_usage UInt64, current_database LowCardinality(String), query String, formatted_query String, normalized_query_hash UInt64, query_kind LowCardinality(String), exception_code Int32, exception String, stack_trace String, team_id Int64, log_comment String, ProfileEvents Map(LowCardinality(String), UInt64)) AS SELECT- hostname,- user,- query_id,- initial_query_id,- is_initial_query,- type,- event_date,- event_time,- event_time_microseconds,- query_start_time,- query_start_time_microseconds,- query_duration_ms,- read_rows,- read_bytes,- written_rows,- written_bytes,- result_rows,- result_bytes,- memory_usage,- peak_threads_usage,- current_database,- query,- formatted_query,- normalized_query_hash,- query_kind,- exception_code,- exception,- stack_trace,- JSONExtractInt(log_comment, 'team_id') AS team_id,- if(isValidJSON(log_comment), log_comment, '{}') AS log_comment,- ProfileEvents-FROM system.query_log-WHERE type != 'QueryStart';-CREATE VIEW posthog.custom_metrics_backups AS WITH- ['ClickHouseCustomMetric_BackupFailed', 'ClickHouseCustomMetric_BackupSuccess', 'ClickHouseCustomMetric_BackupCancelled', 'ClickHouseCustomMetric_BackupAttempts'] AS names,- [toInt64(countIf(status = 'BACKUP_FAILED')), toInt64(countIf(status = 'BACKUP_CREATED')), toInt64(countIf(status = 'BACKUP_CANCELLED')), toInt64(countIf(status = 'CREATING_BACKUP'))] AS values,- ['Number of failed backups', 'Number of successful backups', 'Number of cancelled backups', 'Number of backup attempts'] AS descriptions,- ['gauge', 'gauge', 'gauge', 'gauge'] AS types,- arrayJoin(arrayZip(names, values, descriptions, types)) AS tpl-SELECT- tpl.1 AS name,- map('instance', hostname()) AS labels,- tpl.2 AS value,- tpl.3 AS help,- tpl.4 AS type-FROM system.backup_log-WHERE event_date = today()-GROUP BY- event_date;-CREATE VIEW posthog.custom_metrics_dictionaries AS SELECT- 'ClickHouseCustomMetric_DictionariesFailed' AS name,- map(- 'instance',- hostname(),- 'database',- d.database,- 'dictionary',- d.dict_name,- 'uuid',- toString(d.uuid),- 'status',- toString(d.status)- ) AS labels,- toUInt64(1) AS value,- 'Dictionary is in FAILED or FAILED_AND_RELOADING status' AS help,- 'gauge' AS type-FROM- (- SELECT name AS dict_name, database, uuid, status- FROM system.dictionaries- WHERE status IN ('FAILED', 'FAILED_AND_RELOADING')- ) AS d;-CREATE VIEW posthog.custom_metrics_part_counts AS SELECT- 'ClickHouseCustomMetric_MaxPartCountPerPartition' AS name,- map('instance', hostname(), 'database', database, 'table', `table`, 'partition', partition) AS labels,- part_count AS value,- 'Maximum number of active parts for any partition in a PostHog table' AS help,- 'gauge' AS type-FROM- (- SELECT database, `table`, partition, count() AS part_count- FROM system.parts- WHERE- active- AND- (database = 'posthog')- GROUP BY- database, `table`, partition- ORDER BY database ASC, `table` ASC, part_count DESC, partition ASC- LIMIT 1 BY database, `table`- );-CREATE VIEW posthog.custom_metrics_replication_queue AS WITH- ['ClickHouseCustomMetric_ReplicationQueueStuckEntries', 'ClickHouseCustomMetric_ReplicationQueueMaxPostponedEntrySeconds', 'ClickHouseCustomMetric_ReplicationQueueMaxErrorEntrySeconds'] AS names,- [toInt64(countIf(create_time < (now() - toIntervalDay(15)))), maxIf(dateDiff('seconds', create_time, last_postpone_time), last_postpone_time != '1970-01-01'), maxIf(dateDiff('seconds', create_time, last_exception_time), (last_exception_time != '1970-01-01') AND (last_exception_time > (now() - toIntervalMinute(5))))] AS values,- ['Number of entries that have been in the replication queue for more than 15 days', 'Maximum number of seconds that an entry has been postponed', 'Maximum number of seconds that an entry has been in error'] AS descriptions,- ['gauge', 'gauge', 'gauge'] AS types,- arrayJoin(arrayZip(names, values, descriptions, types)) AS tpl-SELECT- tpl.1 AS name,- map('table', `table`, 'instance', hostname()) AS labels,- tpl.2 AS value,- tpl.3 AS help,- tpl.4 AS type-FROM system.replication_queue-GROUP BY- `table`-HAVING- value > 0;-CREATE VIEW posthog.custom_metrics_server_crash AS SELECT- 'ClickHouseCustomMetric_ServerCrash' AS name,- map('instance', hostname()) AS labels,- count() AS value,- 'Number of server crashes for current date' AS help,- 'gauge' AS type-FROM system.crash_log-WHERE event_date = today()-GROUP BY- hostname();-CREATE VIEW posthog.custom_metrics_table_sizes AS SELECT- 'ClickHouseCustomMetric_TableTotalBytes' AS name,- map('instance', hostname(), 'database', database, 'table', `table`) AS labels,- CAST(total_bytes, 'Float64') AS value,- 'Size of a database table on a given node (need a sum for sharded)' AS help,- 'gauge' AS type-FROM system.tables-WHERE- (database NOT IN ('INFORMATION_SCHEMA', 'information_schema'))-AND- (total_bytes IS NOT NULL);-CREATE VIEW posthog.custom_metrics_test AS SELECT- 'ClickHouseCustomMetric_Test' AS name,- map('instance', hostname()) AS labels,- 1 AS value,- 'Test to check that the metric endpoint is working' AS help,- 'gauge' AS type;