Comment on page

Writing Transforms

Writing a transform is mostly about parsing and processing the incoming object and normalizing it into a RunReveal return format.
The transform function signature is def transform with a single argument.
def transform(event):
return {}
For a full list of transform types consult the Transform Return Format docs.

Getting Started

The cli supports basic CRUD transform functionality.
$ runreveal transform
Transform your data on ingest.
runreveal transform [command]
Available Commands:
create create transform upon receiving your data
delete delete transform
list list transforms
update update transform function for your data
-h, --help help for transform
Creating a transform is done using the runreveal transform create subcommand.
$ runreveal transform create --name tailscale_transform --file
Transforms, when uploaded, are attached to a specific `sourceID` where logs are received from. We support the s3 source, and webhook source today. To attach a transform to a specific source, you can attach directly at creation time, or using the update command.
Here we update a transform to attach it to a specific source.
$ runreveal transform update 2PYmKgiuDnwm9Fcg4kAH8DP1lUm \
--src-id 2PYmPMxKBnyE3E4SrPyAUoezSBX