You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/protocols/transform/index.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,16 +115,21 @@ Here's a list of Segment Transformations with some use case examples.
115
115
116
116
-**Update a property value:** Use [Segment's Public API](https://docs.segmentapis.com/tag/Transformations){:target="_blank"} to transform the property `currency` to have the value `USD`.
117
117
118
-
-**Add a new property name and assign a value:** If you want to create a new property and set a static value, use [Segment's Public API](https://docs.segmentapis.com/tag/Transformations){:target="_blank"} to create `new_property: static_value`. Segment currently supports setting static values for top-level fields with `propertyValueTransformations`. However, Segment doesn't support changing fields outside the properties or traits object with `propertyRenames`.
119
-
120
-
-** Property Transformations:**
121
-
-**Assigning static values:**
122
-
- If you want to create a new property and set a static value, use [Segment's Public API](<https://docs.segmentapis.com/tag/Transformations>){:target="_blank"} to create `new_property: static_value`. Segment currently supports setting static values for top-level fields, as well as fields within the `context` or `properties` object with `propertyValueTransformations`. However, Segment doesn't support changing fields outside the properties or traits object with `propertyRenames`.
123
-
- You can use assign `propertyValueTransformations` a single object to target different fields to assign the same value or multiple objects to target differnt fields with their own static values.
124
-
-**Casing functions:** Use [Segment's Public API](<https://docs.segmentapis.com/tag/Transformations>){:target="_blank"} to transform property value casing to `lowercase, uppercase, snakecase, kebabcase, or titlecase`. You can use `fqlDefinedProperties` to define the `fql` (with or without casing functions) you want to use to and the `propertyName` to apply it towards (this can be an existing property name or a new one).
125
-
-**Static and Dynamic Value Casing:** For example, transform the property value `united states` to `USA` to remain consistent with your data tracking. You can transform these properties using static casing functions (`fqlDefinedProperties": [{"fql": "uppercasecase("United States)", "propertyName": "properties.propertyValue1"}]`) or dynamic casing functions (`fqlDefinedProperties": [{"fql": "lowercase(properties.propertyValue1)", "propertyName": "properties.propertyValue1"}]`).
126
-
-**Create a new property with casing applied value**: Use [Segment's Public API](<https://docs.segmentapis.com/tag/Transformations>){:target="_blank"} to create a new property and set the value of the new property to the transformed value of an existing property. For example, create a new property (`prop2`) with a value of `lowercase(properties.prop1)` by including `fqlDefinedProperties": [{"fql": "lowercase(properties.prop1)", "propertyName": "properties.prop2"}]` in your payload.
127
-
- You can dynamically assign the value of one existing property to another property, or assign the value of an property to a new property without applying casing functions.
118
+
-**Property Transformations**
119
+
-**Assigning static values:** If you want to create a new property and set a static value, use [Segment's Public API](https://docs.segmentapis.com/tag/Transformations){:target="_blank"} to create `new_property: static_value`. Segment currently supports setting static values for top-level fields, as well as fields within the `context` or `properties` object with `propertyValueTransformations`. However, Segment doesn't support changing fields outside the properties or traits object with `propertyRenames`. You can use `propertyValueTransformations` on a single object to assign the same value to different fields or on multiple objects to assign a static value to the same field across objects.
120
+
-**Casing functions:** Use [Segment's Public API](https://docs.segmentapis.com/tag/Transformations){:target="_blank"} to transform property value casing to `lowercase`, `uppercase`, `snakecase`, `kebabcase`, or `titlecase`. When transforming data with casing functions, use the [`fqlDefinedProperties`](https://docs.segmentapis.com/tag/Transformations#operation/createTransformation!ct=application/vnd.segment.v1+json&path=fqlDefinedProperties&t=request){:target="_blank"} array to define the FQL you want to use and the new or existing `propertyName` you'd like to transform.
121
+
-**Static and dynamic value casing:** You can use casing functions to transform property values to create uniform tracking data. For example, you can convert `united states` to `USA` to keep your downstream data consistent. <br/>You can transform these properties using static casing functions: <br/>
- **Create a new property with applied casing**: Use [Segment's Public API](https://docs.segmentapis.com/tag/Transformations){:target="_blank"} to create a new property and set the value of the new property to the transformed value of an existing property. You can dynamically assign the value of one existing property to another, or assign the value of an existing property to a new property without applying casing functions. <br/>For example, create a new property (`prop2`) with a value of `lowercase(properties.prop1)` by including the following snippet in your payload:<br/>
0 commit comments