Transformations Overview

Transform event data in real-time with custom JavaScript and Python functions.
Available Plans
  • free
  • growth
  • enterprise

RudderStack’s Transformations feature lets you write custom functions to implement specific use-cases on your event data, like:

  • Filtering or sampling events
  • Cleaning or aggregating data
  • Data masking or removing sensitive PII to ensure data privacy
  • Enriching events by implementing static logic or leveraging an external API
  • Using an API to implement specific actions on the events

You can create up to:

See the RudderStack Plan Comparison guide for the full list of plan-specific limits.

Learn more about transformations in this self-paced product tour:

Key features

  • Transformations are easy to build, manage, debug, and reuse.
  • Enrich your events in-flight with custom logic before sending them to your destinations.
  • Use prebuilt templates to create transformations for specific use-cases by leveraging Templates.
  • Write transformations in JavaScript and Python.

RudderStack’s Python transformations feature lets you use custom Python code to transform your source events on the fly. It is especially useful for the data teams that generally deal with Python.

Note that:

  • Python transformations are available only for:

  • RudderStack supports Python version 3.11 for writing transformations.

  • RudderStack supports only some of the built-in Python packages to write transformations. These are datetime, json, math, random, requests, time, and urllib, along with the external package python-dateutil.

Device mode transformations are available only in the Enterprise plan.
  • Save unpublished changes as drafts, publish tagged versions, and deploy older transformation versions when you need to roll back.
  • Reuse code across transformations with Libraries
  • Leverage the Transformations API to programmatically manage your transformations.

Questions? Let's figure it out together.

Join the RudderStack Slack community to connect with other users, customers, and the RudderStack team — or reach out for direct support.