Changelog #109
Specify columns to exclude from Realtime streams

CTO, Trigger.dev

We've added support for selective column filtering in Trigger.dev Realtime. You can now specify which columns to exclude from your realtime hooks, giving you more control over what data gets sent to your frontend applications.
Why skip columns?
There are several scenarios where you might want to exclude certain columns from your realtime hooks:
- Privacy and security: Exclude payloads or outputs that may contain sensitive data
- Performance optimization: Skip large text fields, binary data, or other heavy columns to reduce bandwidth and improve streaming performance
- Data filtering: Only stream the specific columns your frontend actually needs, reducing payload size and complexity
How it works
When creating public access tokens or configuring realtime authentication, you can now include a skipColumns
array in the realtime
property. This will automatically filter out the specified columns from all realtime data streams using that token:
import { auth } from "@trigger.dev/sdk";const publicAccessToken = await auth.createPublicToken({ realtime: { skipColumns: ["payload", "output"], },});
By tying the skipColumns
to a public access token, you can ensure that only the data you want to stream is sent to your frontend applications, and the value of skipColumns
cannot be changed after the token is created.
Other columns you may want to skip are:
payload
- The payload of the runoutput
- The output of the runcostInCents
- The cost of the run in centsbaseCostInCents
- The base cost of the run in centsdurationMs
- The duration of the run in millisecondstags
- The tags of the run
Installation
Make sure you update your @trigger.dev/sdk
and trigger.dev
CLI packages to the latest beta version 4.0.0-v4-beta.22
:
# Install the latest beta version of the SDK and any other @trigger.dev/* packagespnpm add @trigger.dev/[email protected]# Use the latest beta version of the CLIpnpm dlx [email protected]