Transformations Overview

Transform event data in real-time with custom JavaScript and Python functions.

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
RudderStack’s Free and Starter plans let you create 5 JavaScript transformations. However, you can create unlimited transformations in the Growth and Enterprise plans. See the Pricing page for more information.

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.

In this section

See the following guides to learn more about the different Transformations features and their usage:

Create TransformationsAdd and test new transformations in RudderStack.
Use TransformationsUse transformations in different RudderStack connection modes.
Manage TransformationsPerform different operations on your transformations like connecting them to destinations, managing notifications, etc.
LibrariesReuse transformation code with transformation libraries.
TemplatesUse prebuilt transformations to implement specific use cases on your event data.
Geolocation ServiceFetch geolocation information from IP address using RudderStack’s geolocation service.
Transformation ActionCreate, test, and publish your JavaScript/Python transformations and libraries directly from your development repository.
ObservabilityGet full visibility into the transformation-specific metrics including errors.
Debugging ErrorsDebug various transformation and library errors.
FAQAnswers to some of the commonly asked questions on transformations.

Questions? Contact us by email or on Slack