Special Keywords

Hevo provides the following keywords to help with creating advanced Transformations.

The $self Keyword

Use the variable $self to apply a formula on multiple fields on which the transformation is being applied.

For example, use the following filters to update the value of the price field:

Filters:
Event Type = deals, and Event Field isactive = false.
Fields = All fields with names in price.

Settings:
Enter value or formula = 1.2* $self.

Using self keyword

Result:
The Transformation is applied to the field as follows:


The $null Keyword

The $null keyword can be used when you want to add fields or update existing field values with a null value. Since all null fields are dropped when Hevo ingests your data, you can create transformations with this keyword to include them again. Or, you may want to assign null values to fields based on some conditions rather than dropping them altogether.

The following sequence of two t\Transformations illustrate the usage of the $null field.

1. Change Field Value

For Event Type = shop and Event Field = price, change the value of price to $null. The field with its null value is not displayed in the test results.

Changing field value to null

2. Add a Field

Now, in the Events transformed in step 1 above, for Event Field = price and Event Field Value Is Null, add a field count with Value, Out-of-Stock. The transformation is applied successfully and can be verified in the results, confirming the behavior of the $null keyword.

The settings appear as follows:

null field settings

Result:
The final output of the two Transformations appears as:

Add field based on a null field value

</div>



Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Nov-25-2022 NA Created as a separate document.
Apr-25-2022 NA Updates the screenshots to reflect the latest UI.
Last updated on 23 Nov 2022

Tell us what went wrong