Transformation actions

Learn about and apply data transformations.

This article applies to supported data sources that are part of an open beta and are subject to change.

Transformation actions help with field mapping while setting up a data source connection. Note that not all transformations are available for all data sources.

How transformation works

Some transformations are automatically recommended. For instance, you may notice recommended compute hash transformations on automatically mapped hashed_email and hashed_phone_number fields. You can modify the automatically recommended transformation or add additional ones as needed. You can specify a series of transformation actions on an input field, and they’ll be applied from top to bottom.

Before you begin

To apply transformations during field mapping, click the 3-dot menu icon under the “Actions” column and click Transformto view a list of available transformations that you can apply to the input field value in the pipeline before it’s imported to your Google Analytics account.

Available transformation actions

Smart hash

To keep your data secure, private customer data that you import should be hashed. Your data will be hashed for you using the SHA256 algorithm, which is the industry standard for one-way hashing. The result is hex encoded. You don’t need to pre-format your data. Relevant PII fields will be normalized, hashed, and encoded for you, and data will be pushed to the API for your use cases.

If you prefer to hash private customer data yourself, see Format your customer data file to ensure it’s formatted correctly. If you upload a hashed data file, don’t hash non-private customer data. Your hashed data will be pushed to the API.

Note:Smart hashing is automatic, meaning you don't need to select anything from the Actions menu.

Compute hash

Transformations are applied on an input column to convert the column to some result. When you compute a hash for a column, the SHA256 algorithm is supported. The result is hex encoded.

Note: Compute hash is applied automatically to PII fields like email and phone number. You can also manually apply this transformation action when you want to apply other transformation actions first and then apply compute hash. For example, if you want to keep the first and last names in the same field in your data source, you can apply the split transformation action first and pick the right piece for first name and left piece for last name, then you apply a compute hash.

Multiply

Multiply the column by a constant floating number.

Eligible source field types: Any numerical and string type.

Multiply by another column

Multiply the value in the source field by the value found in a different column, but within the same source file.

Eligible source field types: Any numerical and string type.

Transform case

Change the column to uppercase, lowercase or titlecase. The transformation action will convert it to a string first.

Eligible source field types: Any type.

Merge fields

Combine two columns with a separator. This transformation will append the second value to the source field value after a specified separator string.

The format is {source_field}{separator}{column_to_merge}.

Eligible source field types: Any type.

Split

Split a column per delimiter and extract one part.

  • Delimitermust be a single character. A space is a valid delimiter.
  • Occurrenceindicates the kth occurrence of the delimiter, where the string is to be split, beginning from “1”.
  • Beforeis a boolean indicating whether to extract the part before the delimiter (true) or after the delimiter (false).

Eligible source field types: String.

Example:

If the input column has a value of "FirstName,MiddleName,LastName":

, 2 false “LastName”

Cast type

Cast the value of a column to another compatible type.

Target type Eligible source types Notes
String
Any Any type can be cast to string.
Real number

String

Integer

Real number is of data type double

If a string value can't be parsed as a double at import time, it results in an error in the "Runs" table.

Integer

String

Real number

Percent

If a string value can't be parsed as a double at import time, it results in an error in the "Runs" table.

Parse timestamp

Convert a string representation of a timestamp to an integer. Date and time objects must be represented as strings in your data source and then transformed using the Parse timestamp transformation action. To learn about supported formats for time and date strings, see Prepare your data for import .

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
12089530541292473463
true
Search Help Center
true
true
true
true
true
69256
true
false
false
false
Create a Mobile Website
View Site in Mobile | Classic
Share by: