Transformation actions help with field mapping while setting up a 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 Actions > Transform to 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 Ads account.
Available transformation actions
Smart hash
To keep your data secure, private customer data that you import should be hashed. Data Manager will hash the data 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. Data Manager will normalize relevant PII fields, perform hashing and encoding for you, and push the data 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. Data Manager will push your hashed data to the API.
Note that 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.
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.
- Delimiter must be a single character. A space is a valid delimiter.
- Occurrence indicates the kth occurrence of the delimiter, where the string is to be split, beginning from “1”.
- Before is 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":
Delimiter | Occurrence | Before | Result |
---|---|---|---|
, |
1 | true | “FirstName” |
, | 1 | false | “MiddleName,LastName” |
, | 2 | true | “FirstName,MiddleName” |
, | 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. |
Convert Date and Time
Convert datetime, timestamp, integer, or string representation of any of these types to a supported timestamp format. While timestamp data types don’t need to be converted if already in a supported format, they can still be put through the transformation.
For rows of data that are missing a timezone, you can set a fallback timezone for the transformation in the Transformation settings panel. If no fallback timezone is selected, rows without a timezone won’t be imported. The fallback timezone for open-ended file connections is pre-populated as the timezone associated with the account, but this can be changed in the transformation menu.
Learn more about how to Prepare your data for import.
Eligible source field types: Timestamp, Datetime, Unix Epoch, Integer, String.