This article will help you:
|
NOTE: This feature is only available to Enterprise customers and organizations that have purchased the Govern Add-on (formerly known as Taxonomy). Only admins and managers can create, modify, and delete transformations.
Additionally, transformations are not currently supported for the User Activity feature or the Revenue LTV chart.
Amplitude’s Transformations feature allows you to transform event data in order to correct common implementation mistakes. Transformations are retroactive: you can apply them to all historical data and create or delete them whenever you like. This means you can make changes to your event data without having to touch your underlying code base. No matter when you recognize a mistake or want to make a change, you can use a transformation to correct all affected data, both historically and moving forward.
Currently, transformations on Amplitude's default user properties are not supported.
NOTE: Transformations are applied at query time when a chart or cohort generates results. This does not affect the raw data. Raw data on Snowflake or Redshift will not be impacted by transformations.
Merge events, event properties, and user properties
For many Amplitude users, the need to consolidate superfluous or duplicate events, event properties, or user properties will eventually arise. Transformations makes this process easy.
Merge events
This transformation allows you to merge events together. This is helpful if you are tracking two or more events that you would like to track as one single event instead. For example, you can merge the events comment_reply_like
and comment_share
into a single event, comment
.
To merge events, follow these steps:
- Click
and select Govern from the drop-down.
- Find the events you want to merge together and click the checkbox next to their names. Once the events are selected, you should see a Transform option appear in the menu.
- Click Transform and select the option Merge duplicates into a single event. Then click Next.
- From the drop-down, select the event you would like to merge your selected events into; or select New Event to create a new event type. If you're creating a new event type, enter the new Event name. Click Preview.
- Review your changes and click Merge to complete the transformation.
Merge event properties
This transformation allows you to merge event properties for all events. This is helpful if you have two event properties that track the same information but were named with different syntax.
For example, imagine an event property is called title
in some cases, and in others, it's called TITLE
—but they represent the same thing on all events. You can clean things up by transforming title
and TITLE
into Title
, combining the data.
To merge event properties, follow these steps:
- Click
and navigate to Govern > Event Properties.
- Find the event properties you want to merge together and click the checkbox next to their names. Once the event properties are selected, you should see a Transform option appear in the menu.
- From the Transform drop-down, select Merge.
- The Merge Event Properties modal will appear. Type a new event property name or type the name of the event property you would like to merge the selected event properties into.
- Review your changes and click Merge to complete the transformation.
Merge user properties
This transformation allows you to merge user properties for all events. This is helpful if you have two user properties that track the same information but were named with different syntax.
For example, imagine a user property called name
in some cases, but in others, is called NAME
—even though they represent the same thing for all users. You can clean things up by transforming name
and NAME
into Name
, combining the data.
To merge user properties, follow these steps:
- Click
and navigate to Govern > User Properties.
- Find the user properties you want to merge together and click the checkbox next to their names. Once the user properties are selected, you should see a Transform option appear in the menu.
- From the Transform drop-down, select Merge.
- The Merge User Properties modal will appear. Type a new user property name or type the name of the user property you would like to merge the selected user properties into.
- Review your changes and click Merge to complete the transformation.
Merge events into event property values
This transformation allows you to merge events into event property values. You can choose to create a new event and add the old events as event property values or add the old events as event property values to an already existing event. This transformation can be helpful if you are logging data into two events with similar syntax when you could log this information as one event with different property values instead.
For example, you could transform the events comment_reply_like
and comment_share
into one event, comment
. The event comment
will then have a new event property comment type
with values reply
like
and share
.
To merge events into event property values, follow these steps:
- Click
and select Govern from the drop-down.
- Find the events you want to merge into event property values and click the checkbox next to their names. Once the events are selected, you should see a Transform option appear in the menu.
- Click Transform and select the option Merge multiple events into a single event with different property values. Then click Next.
- From the drop down, select the event you would like to transform your selected events into event property values for; or select "New Event" to create a new event type. If you're creating a new event type, enter the new Event name. Then click Next.
- Type in the name of the event property you would like the events to be transformed into values for. This can be a new event property or an existing event property. Then click Next.
- On this page, you will map your original event types to new event property values. Enter the event property values and click Preview.
- Review your changes and click Merge to complete the transformation.
Rename property values
This transformation allows you to re-assign event and user property values. This transformation is useful if a property has a number of misspellings or nonsensical values in drop-downs and will allow you to hide them from the UI or turn them into another value.
For example, you can reassign the values of true
and TRUE
to True
.
To rename an event property value, follow these steps:
- Click
and navigate to Govern > Event Properties or Govern > User Properties.
- Find the property with the property value you want to rename and click the checkbox next to its name.
- From the Transform drop-down, select Rename Value.
- The Rename Value modal will appear. Under Current Property Value, click Select Value(s)... .
- From the list, select the value you wish to rename and click Apply.
- Under Derived Value, click Select Value... to set a new value.
- Click New Value and enter the new value in the field that appears.
- Repeat steps 3 - 6 for every value you wish to rename. Then click Next.
- A confirmation modal will appear. If you still want to rename these values, click Rename.
Hide property values
Setting an event property value's visibility status to hidden is helpful for values you may want to track but do not want to appear on the dashboard in any charts. Hiding a property value does not delete its raw data and the value will still be visible in the user's individual event stream.
To hide a property value, follow these steps:
- Find the event property with the property value you want to hide and click the checkbox next to its name.
- From the Transform drop-down, select Hide Value.
- Select the value or values you wish to hide from Amplitude and click Next.
- A confirmation modal will appear. If you still wish to hide these values from Amplitude, click Hide.
Edit and delete transformations
Transformations are not permanent and can be reveresed. Once you've created your transformations, you can edit or delete them.
To edit your transformation, follow these steps:
- Click
and select Govern from the drop-down.
- Find the event, event property, or user property that has been transformed.
- Click the right arrow
next to the name to open the details panel.
- Click Edit next to the transformation definition.
- Make the necessary changes and save.
The same steps can be taken to delete your event property or user property transformations.
To delete your Event transformation, follow these steps:
- Click
and select Govern from the drop-down.
- Find the event that has been transformed and select the checkbox next to its name.
- Click Delete in the menu
- A modal will appear with information on what will happen when you delete the transformation.
- Type "DELETE 1 EVENT" to confirm deletion
Transformations in queries
If you are running a query that uses multiple transformations, then they will be executed in the following order:
- Merge Events
- Merge Events into Event Property Values
- Merge Event Properties
- Rename Value
In general, transformations of transformations are not currently supported. For example, if you merge an event App Open
to Open App
, then you cannot use Open App
as the source for another transformation.