: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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"destination": {
"anyOf": [
{
"description": "Request shape for creating or updating a Databricks batch-export destination.",
"properties": {
"config": {
"description": "Typed configuration for a Databricks batch-export destination.\n\nCredentials live in the linked Integration, not in this config. Mirrors\n`DatabricksBatchExportInputs` in `products/batch_exports/backend/service.py`.",
"properties": {
"catalog": {
"description": "Unity Catalog name.",
"type": "string"
},
"http_path": {
"description": "Databricks SQL warehouse HTTP path.",
"type": "string"
},
"schema": {
"description": "Schema (database) name inside the catalog.",
"type": "string"
},
"table_name": {
"description": "Destination table name.",
"type": "string"
},
"use_automatic_schema_evolution": {
"default": true,
"description": "Whether to let Databricks evolve the destination table schema automatically.",
"type": "boolean"
},
"use_variant_type": {
"default": true,
"description": "Whether to use the Databricks VARIANT type for JSON-like columns.",
"type": "boolean"
}
},
"required": ["http_path", "catalog", "schema", "table_name"],
"type": "object"
},
"integration_id": {
"description": "ID of a databricks-kind Integration. Use the integrations-list MCP tool to find one.",
"type": "number"
},
"type": {
"enum": ["Databricks"],
"type": "string"
}
},
"required": ["type", "integration_id", "config"],
"type": "object"
},
{
"description": "Request shape for creating or updating an Azure Blob Storage batch-export destination.",
"properties": {
"config": {
"description": "Typed configuration for an Azure Blob Storage batch-export destination.\n\nCredentials live in the linked Integration, not in this config. Mirrors\n`AzureBlobBatchExportInputs` in `products/batch_exports/backend/service.py`.",
"properties": {
"compression": {
"anyOf": [
{
"description": "* `brotli` - brotli\n* `gzip` - gzip\n* `lz4` - lz4\n* `snappy` - snappy\n* `zstd` - zstd",
"enum": ["brotli", "gzip", "lz4", "snappy", "zstd"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional compression codec applied to exported files. Valid codecs depend on file_format.\n\n* `brotli` - brotli\n* `gzip` - gzip\n* `lz4` - lz4\n* `snappy` - snappy\n* `zstd` - zstd"
},
"container_name": {
"description": "Azure Blob Storage container name.",
"type": "string"
},
"file_format": {
"default": "JSONLines",
"description": "File format used for exported objects.\n\n* `JSONLines` - JSONLines\n* `Parquet` - Parquet",
"enum": ["Parquet", "JSONLines"],
"type": "string"
},
"legacy_parquet_extension": {
"description": "Whether Parquet files keep the compression codec in their extension, for example '.parquet.zst' rather than '.parquet'. Parquet records its codec inside the file, so new exports leave it out. An export that already wrote Parquet files before this setting existed keeps it, so that pipelines matching on the old names do not break. Has no effect on JSON Lines, which always carries the codec in its extension.",
"type": "boolean"
},
"max_file_size_mb": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "If set, rolls to a new file once the current file exceeds this size in MB."
},
"prefix": {
"default": "",
"description": "Object key prefix applied to every exported file.",
"type": "string"
}
},
"required": ["container_name"],
"type": "object"
},
"integration_id": {
"description": "ID of an azure-blob-kind Integration. Use the integrations-list MCP tool to find one.",
"type": "number"
},
"type": {
"enum": ["AzureBlob"],
"type": "string"
}
},
"required": ["type", "integration_id", "config"],
"type": "object"
},
{
"description": "Request shape for creating or updating a BigQuery batch-export destination.",
"properties": {
"config": {
"description": "Typed configuration for a BigQuery batch-export destination.\n\nCredentials live in the linked Integration, not in this config. Mirrors the\nnon-credential fields of `BigQueryBatchExportInputs` in\n`products/batch_exports/backend/service.py`.",
"properties": {
"dataset_id": {
"description": "BigQuery dataset ID to write to.",
"type": "string"
},
"table_id": {
"default": "events",
"description": "BigQuery table ID inside the dataset.",
"type": "string"
},
"use_json_type": {
"default": false,
"description": "Whether to export 'properties', 'set', and 'set_once' fields as the BigQuery JSON type rather than STRING. Cannot be changed after the export is created.",
"type": "boolean"
}
},
"required": ["dataset_id"],
"type": "object"
},
"integration_id": {
"description": "ID of a google-cloud-service-account-kind Integration. Use the integrations-list MCP tool to find one.",
"type": "number"
},
"type": {
"enum": ["BigQuery"],
"type": "string"
}
},
"required": ["type", "integration_id", "config"],
"type": "object"
},
{
"description": "Request shape for creating or updating a PostgreSQL batch-export destination.",
"properties": {
"config": {
"description": "Typed configuration for a PostgreSQL batch-export destination.\n\nConnection credentials may live in a linked Integration (when one is provided) or\ninline in this config (legacy). Mirrors the non-credential fields of\n`PostgresBatchExportInputs` in `products/batch_exports/backend/service.py`.",
"properties": {
"database": {
"description": "PostgreSQL database name to connect to.",
"type": "string"
},
"has_self_signed_cert": {
"default": false,
"description": "Legacy SSL option for direct credential configuration. Ignored when using a PostgreSQL integration.",
"type": "boolean"
},
"schema": {
"default": "public",
"description": "PostgreSQL schema name containing the destination table.",
"type": "string"
},
"table_name": {
"default": "events",
"description": "PostgreSQL table name to write exported rows into.",
"type": "string"
}
},
"required": ["database"],
"type": "object"
},
"integration_id": {
"description": "ID of a postgresql-kind Integration providing connection credentials. Required when creating a batch export. Use the integrations-list MCP tool to find one.",
"type": "number"
},
"type": {
"enum": ["Postgres"],
"type": "string"
}
},
"required": ["type", "integration_id", "config"],
"type": "object"
},
{
"description": "Request shape for creating or updating an AWS S3 batch-export destination.",
"properties": {
"config": {
"description": "Typed configuration for an AWS S3 batch-export destination.\n\nAWS credentials live in the linked aws-s3 Integration. Mirrors the non-credential fields of\n`AwsS3BatchExportInputs` in `products/batch_exports/backend/service.py`.",
"properties": {
"bucket_name": {
"description": "Name of the destination bucket.",
"type": "string"
},
"compression": {
"anyOf": [
{
"description": "* `brotli` - brotli\n* `gzip` - gzip\n* `lz4` - lz4\n* `snappy` - snappy\n* `zstd` - zstd",
"enum": ["brotli", "gzip", "lz4", "snappy", "zstd"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional compression codec applied to exported files. Valid codecs depend on file_format.\n\n* `brotli` - brotli\n* `gzip` - gzip\n* `lz4` - lz4\n* `snappy` - snappy\n* `zstd` - zstd"
},
"encryption": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional S3 server-side encryption algorithm (e.g. 'AES256' or 'aws:kms')."
},
"file_format": {
"default": "JSONLines",
"description": "File format used for exported objects.\n\n* `Parquet` - Parquet\n* `JSONLines` - JSONLines",
"enum": ["Parquet", "JSONLines"],
"type": "string"
},
"kms_key_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "KMS key ID to use when encryption is 'aws:kms'."
},
"legacy_parquet_extension": {
"description": "Whether Parquet files keep the compression codec in their extension, for example '.parquet.zst' rather than '.parquet'. Parquet records its codec inside the file, so new exports leave it out. An export that already wrote Parquet files before this setting existed keeps it, so that pipelines matching on the old names do not break. Has no effect on JSON Lines, which always carries the codec in its extension.",
"type": "boolean"
},
"max_file_size_mb": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "If set, rolls to a new file once the current file exceeds this size in MB."
},
"prefix": {
"description": "Object key prefix applied to every exported file.",
"type": "string"
},
"region": {
"description": "Region the bucket is in (e.g. 'us-east-1').",
"type": "string"
}
},
"required": ["bucket_name", "region", "prefix"],
"type": "object"
},
"integration_id": {
"description": "ID of an aws-s3-kind Integration providing AWS credentials. Use the integrations-list MCP tool to find one.",
"type": "number"
},
"type": {
"enum": ["AwsS3"],
"type": "string"
}
},
"required": ["type", "integration_id", "config"],
"type": "object"
},
{
"description": "Request shape for creating or updating an S3-compatible batch-export destination.",
"properties": {
"config": {
"description": "Typed configuration for an S3-compatible batch-export destination (Cloudflare R2,\nDigitalOcean Spaces, etc.).\n\nCredentials and the provider `endpoint_url` live in the linked s3-compatible Integration.\nMirrors the non-credential fields of `S3CompatibleBatchExportInputs` in\n`products/batch_exports/backend/service.py`.",
"properties": {
"bucket_name": {
"description": "Name of the destination bucket.",
"type": "string"
},
"compression": {
"anyOf": [
{
"description": "* `brotli` - brotli\n* `gzip` - gzip\n* `lz4` - lz4\n* `snappy` - snappy\n* `zstd` - zstd",
"enum": ["brotli", "gzip", "lz4", "snappy", "zstd"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional compression codec applied to exported files. Valid codecs depend on file_format.\n\n* `brotli` - brotli\n* `gzip` - gzip\n* `lz4` - lz4\n* `snappy` - snappy\n* `zstd` - zstd"
},
"file_format": {
"default": "JSONLines",
"description": "File format used for exported objects.\n\n* `Parquet` - Parquet\n* `JSONLines` - JSONLines",
"enum": ["Parquet", "JSONLines"],
"type": "string"
},
"legacy_parquet_extension": {
"description": "Whether Parquet files keep the compression codec in their extension, for example '.parquet.zst' rather than '.parquet'. Parquet records its codec inside the file, so new exports leave it out. An export that already wrote Parquet files before this setting existed keeps it, so that pipelines matching on the old names do not break. Has no effect on JSON Lines, which always carries the codec in its extension.",
"type": "boolean"
},
"max_file_size_mb": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "If set, rolls to a new file once the current file exceeds this size in MB."
},
"prefix": {
"description": "Object key prefix applied to every exported file.",
"type": "string"
},
"region": {
"description": "Region the bucket is in (e.g. 'us-east-1').",
"type": "string"
},
"use_virtual_style_addressing": {
"default": false,
"description": "Use virtual-hosted-style addressing rather than path-style.",
"type": "boolean"
}
},
"required": ["bucket_name", "region", "prefix"],
"type": "object"
},
"integration_id": {
"description": "ID of an s3-compatible-kind Integration providing credentials and the provider endpoint URL. Use the integrations-list MCP tool to find one.",
"type": "number"
},
"type": {
"enum": ["S3Compatible"],
"type": "string"
}
},
"required": ["type", "integration_id", "config"],
"type": "object"
},
{
"description": "Request shape for creating or updating a Snowflake batch-export destination.",
"properties": {
"config": {
"description": "Typed configuration for a Snowflake batch-export destination.\n\nAccount, user, authentication type and credentials live in the linked Integration, never here.\nMirrors the non-credential fields of `SnowflakeBatchExportInputs` in\n`products/batch_exports/backend/service.py`.",
"properties": {
"database": {
"description": "Snowflake database to write to.",
"type": "string"
},
"role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional Snowflake role to assume for the session."
},
"schema": {
"description": "Schema inside the database containing the destination table.",
"type": "string"
},
"table_name": {
"default": "events",
"description": "Destination table name.",
"type": "string"
},
"warehouse": {
"description": "Snowflake compute warehouse to use.",
"type": "string"
}
},
"required": ["database", "warehouse", "schema"],
"type": "object"
},
"integration_id": {
"description": "ID of a snowflake-kind Integration providing the account, user and credentials. Use the integrations-list MCP tool to find one.",
"type": "number"
},
"type": {
"enum": ["Snowflake"],
"type": "string"
}
},
"required": ["type", "integration_id", "config"],
"type": "object"
},
{
"description": "Request shape for creating or updating a Redshift batch-export destination.",
"properties": {
"config": {
"description": "Typed configuration for a Redshift batch-export destination.\n\nConnection credentials may live in a linked Integration (when one is provided) or inline in\nthis config (legacy). Mirrors the non-credential fields of `RedshiftBatchExportInputs` in\n`products/batch_exports/backend/service.py`.",
"properties": {
"copy_inputs": {
"description": "S3 staging configuration, required when mode is 'COPY'.",
"properties": {
"authorization": {
"anyOf": [
{
"description": "ID of an aws-s3-kind Integration.",
"type": "number"
},
{
"description": "ARN of an IAM role attached to the Redshift cluster.",
"type": "string"
},
{
"description": "Legacy AWS access keys. Updates can keep this block unchanged. New or changed keys are rejected.",
"properties": {
"aws_access_key_id": {
"type": "string"
},
"aws_secret_access_key": {
"type": "string"
}
},
"required": ["aws_access_key_id", "aws_secret_access_key"],
"type": "object"
}
],
"description": "Authorization for Redshift to read staged files during COPY: an IAM role ARN or an AWS S3 integration ID. Updates can keep legacy AWS access keys unchanged. New or changed keys are rejected."
},
"bucket_credentials": {
"anyOf": [
{
"description": "ID of an aws-s3-kind Integration.",
"type": "number"
},
{
"description": "Legacy AWS access keys. Updates can keep this block unchanged. New or changed keys are rejected.",
"properties": {
"aws_access_key_id": {
"type": "string"
},
"aws_secret_access_key": {
"type": "string"
}
},
"required": ["aws_access_key_id", "aws_secret_access_key"],
"type": "object"
}
],
"description": "AWS S3 integration ID used to stage files in the S3 bucket. Updates can keep legacy AWS access keys unchanged. New or changed keys are rejected."
},
"region_name": {
"description": "AWS region of the staging S3 bucket.",
"type": "string"
},
"s3_bucket": {
"description": "S3 bucket where files are staged before the Redshift COPY.",
"type": "string"
},
"s3_key_prefix": {
"description": "Key prefix for staged files in the S3 bucket.",
"type": "string"
}
},
"required": [
"s3_bucket",
"region_name",
"s3_key_prefix",
"authorization",
"bucket_credentials"
],
"type": "object"
},
"database": {
"description": "Redshift database name to connect to.",
"type": "string"
},
"host": {
"description": "Redshift cluster or Serverless workgroup endpoint. Required when using an AWS Redshift integration; plain Redshift integrations store the host themselves.",
"type": "string"
},
"mode": {
"default": "INSERT",
"description": "How rows reach Redshift: batched INSERT statements, or COPY from files staged in S3.\n\n* `INSERT` - INSERT\n* `COPY` - COPY",
"enum": ["INSERT", "COPY"],
"type": "string"
},
"port": {
"default": 5439,
"description": "Port the Redshift server listens on.",
"type": "number"
},
"properties_data_type": {
"default": "varchar",
"description": "Data type used for JSON-like columns such as event properties.\n\n* `varchar` - varchar\n* `super` - super",
"enum": ["varchar", "super"],
"type": "string"
},
"schema": {
"default": "public",
"description": "Redshift schema name containing the destination table.",
"type": "string"
},
"table_name": {
"default": "events",
"description": "Redshift table name to write exported rows into.",
"type": "string"
}
},
"required": ["database"],
"type": "object"
},
"integration_id": {
"description": "ID of an aws-redshift-kind Integration providing connection credentials. Use the integrations-list MCP tool to find one.",
"type": "number"
},
"type": {
"enum": ["Redshift"],
"type": "string"
}
},
"required": ["type", "integration_id", "config"],
"type": "object"
}
],
"description": "Destination configuration. Required integration_id is enforced per destination type."
},
"hogql_modifiers": {
"anyOf": [
{
"properties": {
"bounceRateDurationSeconds": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"bounceRatePageViewMode": {
"anyOf": [
{
"enum": ["count_pageviews", "uniq_urls", "uniq_page_screen_autocaptures"],
"type": "string"
},
{
"type": "null"
}
]
},
"convertToProjectTimezone": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"cookielessTrafficIsRegular": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Do not treat a missing user agent as automation on cookieless events. Positive bot signals and custom project rules still apply. Resolved server-side; not intended to be set by clients."
},
"customBotDefinitions": {
"anyOf": [
{
"items": {
"properties": {
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Reported by `$virt_traffic_category`. Defaults to `custom`."
},
"combiner": {
"description": "Whether every condition must match (AND) or any one of them (OR).",
"enum": ["AND", "OR"],
"type": "string"
},
"id": {
"type": "string"
},
"items": {
"items": {
"properties": {
"id": {
"type": "string"
},
"key": {
"description": "The event property this condition reads.",
"enum": [
"$raw_user_agent",
"$ip",
"$lib",
"$host",
"$pathname",
"$current_url",
"$browser",
"$os",
"$browser_language",
"$screen_width",
"$screen_height",
"$geoip_country_code",
"$referrer",
"$referring_domain"
],
"type": "string"
},
"matcher": {
"enum": ["contains", "regex", "exact", "cidr"],
"type": "string"
},
"pattern": {
"description": "Matched against the property named by `key`.",
"type": "string"
}
},
"required": ["id", "key", "matcher", "pattern"],
"type": "object"
},
"type": "array"
},
"name": {
"description": "Reported by `$virt_bot_name` and `$virt_bot_operator` when the rule matches.",
"type": "string"
}
},
"required": ["combiner", "id", "items", "name"],
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
]
},
"customChannelTypeRules": {
"anyOf": [
{
"items": {
"properties": {
"channel_type": {
"type": "string"
},
"combiner": {
"enum": ["AND", "OR"],
"type": "string"
},
"id": {
"type": "string"
},
"items": {
"items": {
"properties": {
"id": {
"type": "string"
},
"key": {
"enum": [
"utm_source",
"utm_medium",
"utm_campaign",
"referring_domain",
"url",
"pathname",
"hostname"
],
"type": "string"
},
"op": {
"enum": [
"exact",
"is_not",
"is_set",
"is_not_set",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
]
}
},
"required": ["id", "key", "op"],
"type": "object"
},
"type": "array"
}
},
"required": ["channel_type", "combiner", "id", "items"],
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
]
},
"dataWarehouseEventsModifiers": {
"anyOf": [
{
"items": {
"properties": {
"distinct_id_field": {
"type": "string"
},
"id_field": {
"type": "string"
},
"table_name": {
"type": "string"
},
"timestamp_field": {
"type": "string"
}
},
"required": ["distinct_id_field", "id_field", "table_name", "timestamp_field"],
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
]
},
"debug": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"forceClickhouseDataSkippingIndexes": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "If these are provided, the query will fail if these skip indexes are not used"
},
"formatCsvAllowDoubleQuotes": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"inCohortVia": {
"anyOf": [
{
"enum": ["auto", "leftjoin", "subquery", "leftjoin_conjoined"],
"type": "string"
},
{
"type": "null"
}
]
},
"inlineCohortCalculation": {
"anyOf": [
{
"enum": ["off", "auto", "always"],
"type": "string"
},
{
"type": "null"
}
]
},
"materializationMode": {
"anyOf": [
{
"enum": ["auto", "legacy_null_as_string", "legacy_null_as_null", "disabled"],
"type": "string"
},
{
"type": "null"
}
]
},
"materializedColumnsOptimizationMode": {
"anyOf": [
{
"enum": ["disabled", "optimized"],
"type": "string"
},
{
"type": "null"
}
]
},
"materializeRepeatedCTEs": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Reuse eligible bounded event aggregates within one query execution. When unset, the server may enable it via the cloud feature flag."
},
"mergeFederatedAggregateJoins": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Merge sibling aggregating LEFT JOINs over federated Postgres tables into one UNION ALL join, so their scans overlap"
},
"negatedPersonFiltersNotIn": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Replace negated person-property filters in the WHERE of an `events` query (such as `email not_icontains`) with `person_id NOT IN (SELECT id FROM persons WHERE <the filters fail>)`, so the query no longer joins every person. Applies only when every filtered person property has a materialized column, nothing else in the query reads that persons join, and the join would be a LEFT JOIN."
},
"optimizeJoinedFilters": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"optimizeProjections": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"parserMode": {
"anyOf": [
{
"enum": [
"cpp_only",
"cpp_with_rust_shadow",
"cpp_with_rust_py_shadow",
"rust_with_cpp_shadow",
"rust_only",
"rust_py_only",
"rust_py_with_cpp_shadow"
],
"type": "string"
},
{
"type": "null"
}
],
"description": "HogQL parser backend; absent → `rust_py_with_cpp_shadow` (rust-py is primary, cpp runs as a sampled shadow). `*_shadow` modes return the primary result and sample-compare against the other parser, reporting divergences without failing the request. The `rust_py_*` modes drive the same hand-rolled Rust parser as `rust_*` but build `posthog.hogql.ast` dataclass instances directly via PyO3, skipping the JSON round-trip."
},
"personIdPushdown": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Push an `id IN (SELECT person_id FROM <left table> WHERE …)` predicate into the joined persons subquery, so the latest-version lookup only reads persons that the outer query's left-table filters can reach. Applies only to a persons join from the query's own FROM table."
},
"personsArgMaxVersion": {
"anyOf": [
{
"enum": ["auto", "v1", "v2"],
"type": "string"
},
{
"type": "null"
}
]
},
"personsJoinMode": {
"anyOf": [
{
"enum": ["inner", "left"],
"type": "string"
},
{
"type": "null"
}
]
},
"personsOnEventsMode": {
"anyOf": [
{
"enum": [
"disabled",
"person_id_no_override_properties_on_events",
"person_id_override_properties_on_events",
"person_id_override_properties_joined"
],
"type": "string"
},
{
"type": "null"
}
]
},
"propertyGroupsMode": {
"anyOf": [
{
"enum": ["enabled", "disabled", "optimized"],
"type": "string"
},
{
"type": "null"
}
]
},
"pushDownPredicates": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"s3TableUseInvalidColumns": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"sessionIdPushdown": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Push a `session_id_v7 IN (SELECT … FROM events WHERE …)` predicate into the raw_sessions subquery to limit aggregation to sessions that participate in the outer events filter."
},
"sessionPropertyPreAggregation": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Pre-filter raw_sessions aggregation by `session_id_v7 IN (cheap pre-aggregation that only materializes the columns referenced by the outer-WHERE session predicate)`. Useful when the breakdown/SELECT pulls in many session columns (e.g. `$channel_type`) but the filter only references one (e.g. `$entry_current_url`)."
},
"sessionsV2JoinMode": {
"anyOf": [
{
"enum": ["string", "uuid"],
"type": "string"
},
{
"type": "null"
}
]
},
"sessionTableVersion": {
"anyOf": [
{
"enum": ["auto", "v1", "v2", "v3"],
"type": "string"
},
{
"type": "null"
}
]
},
"sessionTimestampBufferMinutes": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Padding, in minutes, on each side of the event time range when it filters the sessions table by session start. Defaults to 3 days. It can only narrow the range: values above the default are ignored. Lower it only for a query that keeps just the sessions that start inside its own time range."
},
"timings": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"typeAwareCastSimplification": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Remove provably redundant casts and nullability wrappers (e.g. `toString(String)`, `assumeNotNull(non_nullable)`, dead `ifNull` fallbacks) using inferred expression types"
},
"useMaterializedViews": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"useNewEventsSchema": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Read events from the native JSON events table (`true`) or the legacy events table (`false`). When unset, a staff person's `ph_new_events_schema` cookie applies, then the project's listing in the `CLICKHOUSE_HOGQL_USE_NEW_EVENTS_SCHEMA_TEAMS` instance setting, then the `CLICKHOUSE_HOGQL_USE_NEW_EVENTS_SCHEMA` instance setting. This is an internal rollout switch, and the project settings API ignores it."
},
"usePreaggregatedIntermediateResults": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"usePreaggregatedTableTransforms": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Try to automatically convert HogQL queries to use preaggregated tables at the AST level *"
},
"useWebAnalyticsPreAggregatedTables": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"webAnalyticsFirstPageviewFilters": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Serve filters on the stored session-entry attribution properties (`$channel_type`, `$entry_utm_*`, `$entry_referring_domain`) by recomputing the value from the session's first pageview. Resolved server-side; not intended to be set by clients."
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "HogQL modifiers to use when the query runs, as an object keyed by modifier name, for example {\"convertToProjectTimezone\": true}. Only supported when 'model' is 'hogql'. Each modifier set here overrides the project modifier with the same name, and the project modifiers apply to all others. If neither sets convertToProjectTimezone, it defaults to false, so timestamps are exported in UTC. Set it to true to export timestamps in the project timezone instead. Unknown modifier names are rejected. On update, the object replaces the modifiers stored on the export, so include every modifier to keep, or send null to remove them all."
},
"hogql_query": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "HogQL SELECT query. With model 'hogql', its results are the data exported by every run. The query may reference the {data_interval_start} and {data_interval_end} placeholders, replaced with each run's data interval bounds, for example: WHERE timestamp >= {data_interval_start} AND timestamp < {data_interval_end}. Without them every run exports all rows the query returns. Required when model is 'hogql'."
},
"id": {
"description": "A UUID string identifying this batch export.",
"type": "string"
},
"incremental_mode": {
"description": "How this batch export handles incremental updates.\n\n* `APPEND` - Append\n* `MERGE` - Merge",
"enum": ["APPEND", "MERGE"],
"type": "string"
},
"interval": {
"description": "How often the batch export should run.\n\n* `hour` - hour\n* `day` - day\n* `week` - week\n* `every 5 minutes` - every 5 minutes\n* `every 15 minutes` - every 15 minutes",
"enum": ["hour", "day", "week", "every 5 minutes", "every 15 minutes"],
"type": "string"
},
"model": {
"description": "Which data model to export: events, persons, sessions, or hogql. The hogql model exports the results of hogql_query.\n\n* `events` - Events\n* `persons` - Persons\n* `sessions` - Sessions\n* `hogql` - Hogql",
"enum": ["events", "persons", "sessions", "hogql"],
"type": "string"
},
"name": {
"description": "Human-readable name for the batch export.",
"type": "string"
},
"offset_day": {
"anyOf": [
{
"maximum": 6,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"description": "Day-of-week offset for weekly intervals (0=Sunday, 6=Saturday)."
},
"offset_hour": {
"anyOf": [
{
"maximum": 23,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"description": "Hour-of-day offset (0-23) for daily and weekly intervals."
},
"paused": {
"description": "Whether the batch export is paused.",
"type": "boolean"
},
"primary_key": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "The column or columns in the provided HogQL query that make up the primary key for a HogQL-backed batch export. Required if incremental mode is 'MERGE'"
},
"timezone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "IANA timezone name (e.g. 'America/New_York', 'Europe/London', 'UTC') controlling daily and weekly interval boundaries."
},
"version_key": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "The column or columns in the provided HogQL query that make up the version key for a HogQL-backed batch export."
}
},
"required": ["id"],
"type": "object"
}