From 8ed0462698ae89efca4617ce6e3d71f51d5d26c4 Mon Sep 17 00:00:00 2001 From: sahidya Date: Tue, 22 Sep 2026 15:30:09 -0400 Subject: [PATCH 1/2] [Logs] Update Logpush Transformers documentation --- .../docs/logs/logpush/transformers.mdx | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/content/docs/logs/logpush/transformers.mdx b/src/content/docs/logs/logpush/transformers.mdx index 76103b3a5e0..9add0ed0c8c 100644 --- a/src/content/docs/logs/logpush/transformers.mdx +++ b/src/content/docs/logs/logpush/transformers.mdx @@ -13,8 +13,8 @@ import { DashButton, Badge } from "~/components"; -:::note[Closed beta] -Transformers are in closed beta. Contact your Cloudflare Account Executive for access. Beta usage is not billed. The API surface may change before GA. +:::note[Beta] +Transformers are in beta. Contact your Cloudflare Account Executive for access. Beta usage is not billed. ::: Transformers let you run a SQL query against each batch of records before Logpush delivers them to your destination. Use them to filter records you do not want to store, reshape fields to match a downstream schema, redact sensitive values, compute new fields, or add static metadata. @@ -70,6 +70,19 @@ Every transformer action is available through the Cloudflare API. To authenticat | Update a transformer | `PUT` | `accounts/:account_id/logpush/transformers/:id` | | Delete a transformer | `DELETE` | `accounts/:account_id/logpush/transformers/:id` | +The following request creates a transformer that selects three fields from the zone-scoped `dns_logs` dataset: + +```bash +curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/logpush/transformers" \ + --request POST \ + --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ + --json '{ + "name": "dns-query-fields", + "description": "Selects key fields from DNS query logs.", + "code": "SELECT QueryName, QueryType, ResponseCode FROM dns_logs" + }' +``` + To attach or detach a transformer from a job, set `transformer_id` on the Logpush job. Refer to [Logpush job setup](/logs/logpush/logpush-job/) for job endpoints. ## The SQL transformer contract @@ -118,7 +131,7 @@ In the dashboard, validation errors appear inline in the editor with line and co | Limit | Value | | ------------------------------ | ----------- | -| SQL query size | 10 KB | +| SQL query size | 250 KB | | Transformer name length | 255 bytes | | Transformer description length | 4,096 bytes | | Filesystem access from a query | None | @@ -270,11 +283,11 @@ Delivered record: | HTTP | Message | Cause | | ----- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `403` | `transformer feature is not available for this account` | Your account does not have access to Transformers. Contact your Cloudflare Account Executive. | +| `403` | `transformer feature is not available for this account` | Your account does not have access to Transformers. | | `400` | `missing required field: name` | Add a `name` field to the request body. | | `400` | `missing required field: code` | Add a non-empty `code` field with your SQL query. | | `400` | Schema validation error (unknown column, invalid syntax) | The SQL references a field that does not exist, uses unsupported syntax, or has a type mismatch. Fix the query and retry. | -| `413` | (request entity too large) | The SQL query exceeds 10 KB. Shorten the query. | +| `413` | (request entity too large) | The SQL query exceeds 250 KB. Shorten the query. | | `400` | `transformer N not found for this account` | The transformer ID does not exist, or belongs to a different account. | | `400` | `transformer N dataset "X" does not match job dataset "Y"` | The transformer's `FROM` table does not match the job's dataset. | From b668f13ce96b90f4b40bb01cec19ecbafede0912 Mon Sep 17 00:00:00 2001 From: sahidya Date: Wed, 23 Sep 2026 19:13:29 -0400 Subject: [PATCH 2/2] [Logs] Use API request component for Transformers --- .../docs/logs/logpush/transformers.mdx | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/content/docs/logs/logpush/transformers.mdx b/src/content/docs/logs/logpush/transformers.mdx index 9add0ed0c8c..a4a21059739 100644 --- a/src/content/docs/logs/logpush/transformers.mdx +++ b/src/content/docs/logs/logpush/transformers.mdx @@ -9,7 +9,7 @@ products: - logpush --- -import { DashButton, Badge } from "~/components"; +import { APIRequest, DashButton, Badge } from "~/components"; @@ -72,16 +72,15 @@ Every transformer action is available through the Cloudflare API. To authenticat The following request creates a transformer that selects three fields from the zone-scoped `dns_logs` dataset: -```bash -curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/logpush/transformers" \ - --request POST \ - --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ - --json '{ - "name": "dns-query-fields", - "description": "Selects key fields from DNS query logs.", - "code": "SELECT QueryName, QueryType, ResponseCode FROM dns_logs" - }' -``` + To attach or detach a transformer from a job, set `transformer_id` on the Logpush job. Refer to [Logpush job setup](/logs/logpush/logpush-job/) for job endpoints.