Transforms| Hitchhikers Platform

Below we will go through the available transform options and some supporting examples.

Remove Characters

This transform trims spaces and removes all unwanted special characters, numbers or spaces from the inputted columns of data.

Remove Characters

For example, if the data you pulled in from your Connector looks like the example below, you can apply the ‘Remove Unwanted Characters’ transform to the Year Established Column to remove the slash.

Location Name Year Established
Turtlehead Tacos /2013
Turtlehead Tacos /2005
Turtlehead Tacos /2014


Fix Capitalization

This transform converts the text of the inputted columns by applying the selected capitalization options:

  • All Caps
  • All Lower Case
  • Proper Case
    • This capitalization the first letter of every word (e.g., This Is Proper Case)

Filter Rows

This transform allows you to remove or keep rows based on a filter criteria provided. For example, the criteria can be one of the following:

  • is blank
  • is not blank
  • equals
  • does not equal
  • contains
  • does not contain
  • greater than
  • greater than or equal to
  • less than
  • less than or equal to

For example, if you want to upload product data, but you don’t want to upload any inventory that is out of stock you can use this transform to remove data that matches the criteria of ‘In Stock’ equals ‘No’. This would only upload the first two rows from the dataset below:

Product Name In Stock Product SKU
T-shirt Yes 123456
Tank top Yes
Sweatpants No 4567890


When using the ‘Filter Rows Based on Criteria’ transform, you can apply multiple criteria. You can select either AND conditionals, or OR conditionals. All criteria provided must use the same conditional (e.g., either all AND, or all OR). If you are only specifying a single filter criteria, the conditional you select will not have an impact on the final result, even though a selection is still required.

Meaning, you can exclude products that are both out of stock, and do not have an associated product SKU. Or, you can exclude any products that are either out of stock or missing a product SKU.

Find and Replace

Replace the current cell value with a specific value that you provide.

This transform respects blanks, so:

  • If ‘Find Value’ is left blank, the transform will look for empty cells
  • If the Replace With field is left blank, the value of ‘Find’ criteria will be replaced with a blank cell.

By default the transform will ignore casing, but if you would like to respect casing you can toggle this on.

Add Columns with Static Value

This transform will add a column to the given data set with repeating row values that you specify.

To do this you will enter a Name for the column you’d like to add, and the repeating value of that column.

The value entered will apply to all rows, so this is something that applies to everything in the data set you are looking to load into Yext.

Extract Text

This transform will extract text from a column based on matching characters or offset. To do this you will enter the name of the new column for the extracted data. Then you will select the operation:

  • All Text After
  • All Text Before
  • Some Text After (find a subset of text)
  • Some Text Before (find a subset of text)

Next you enter the desired ‘Extract From’ setting — this specifies where the text should be extracted:

  • First Instance of Matching Text: Delimit on the first instance of the matching text
  • Last Instance of Match Text: Delimit on the last instance of the matching text
  • Offset From Beginning: Determines the delimiter based on the provided Offset Length starting from the beginning of the text
  • Offset From End: Determines the delimiter based on the provided Offset Length starting from the end of the text

Finally, you enter the Matching Text, which is the text to search for that will queue the extraction.

Extract Text

For example, you may want to extract usernames from a list of emails. To do this you can use the ‘All Text Before’ Operation where the ‘Extract From’ setting is the ‘First Instance of Match Text’, and the matching text is ‘@’.

Name Email Username
Marty Morris mmorris@turtleheadtacos.com mmorris


This would add the new ‘Username’ column above to your dataset.

Or, you may want to extract store IDs from a relative URL path. The URL path is consistent for each store, therefore they should use the offset option where the Extract Option is ‘All Text After’ and your Extract From setting is ‘Offset from Beginning’ and the Offset Length is 20.

Name Address Relative URL Store ID
Turtlehead Tacos 123 Main Street /turtleheadtacos/ca/store12 store12


This would add the new ‘Store ID’ column to your above dataset.

Merge Columns

This transform will merge columns together with an optional delimiter. To do this, you select the columns you want to merge from the drop-down menu. The order of the columns you select will determine the order of the merged data.

Merge Columns

For example, if you have a column with the URLs from the main domain of your page, and you have a separate column for your Store IDs, you can merge the columns to create the store specific URLs.

To do this, you would merge the URL column with the Store ID column, and use ‘/’ as the delimiter. This would add ‘Full URL’ as a new column to the below dataset.

Location Name URL Store ID Store ID
Turtlehead Tacos https://https://turtleheadtacos.com store12 https://turtleheadtacos.com/store12


Functions

Functions are custom transforms. You can create a fully customized Function in TypeScript.

All Connector Function Transforms will expect a single generic function signature, outlined below in TypeScript.

 export function myCustomTransform(cellValue: string): string {
  /** TODO: build transformed cell */
  return cell;
 }

When creating a Function Transform, you must specify which Columns in the Table that you would like to transform. The Connector system will make a separate function call for each Cell in each specified Column in the Table, hence the singular string argument and expected return value.

After creating a custom transform, you can then select the function in the UI as you would select a built-in transform.

To learn more about creating functions visit the Get Started with Yext Functions guide.

Format Dates

You can use this transform in order to convert the format of your input date value into the format compatible with the Yext Knowledge Graph.

First, select the column(s) to transform. Then, select the date format that matches the input dates. If none of the options match, select “Custom” and enter a java.time.format.DateTimeFormatter compatible format string.

After you select the date format of your inputs, the transform will convert all inputs into the Yext Knowledge Graph date format. That way, when mapping to a date field type, your date format will be valid.

For example, if your input dates are of the format 29-09-2022, select dd-MM-yyyy, and the transform will convert all dates into the KG-compatible format, which is yyyy-MM-dd.

Format Times

You can use this transform in order to convert the format of your input time value into the format compatible with the Yext Knowledge Graph.

First, select the column(s) to transform. Then, select the time format that matches the input time. If none of the options match, select “Custom” and enter a java.time.format.DateTimeFormatter compatible format string.

After you select the time format of your inputs, the transform will convert all inputs into the Yext Knowledge Graph time format. That way, when mapping to a time field type, your time format will be valid.

For example, if your input times are of the format 9:01:09 PM, select h:mm:ss a, and the transform will convert all times into the KG-compatible format.

Ignore Columns

Use this transform to remove specified columns from the preview table. This will filter your view so that only relevant columns are visible in the UI and available to be used in subsequent transforms and mapped to a field in the Knowledge Graph.

Split Column

This transform will split the selected column into new, distinct columns at each occurrence of a specified delimiter.

First, specify the input column you would like to split. Next, add a Name for each new column you’d like to create. Finally, you’ll need to specify the delimiter by which to split your column.

NOTE: The transform will not make any changes to your input column value, rather it will only create NEW columns. So, if you only specify 1 New Column, that column will always retain the exact value of the existing column, since 2 columns by which to split the data into was not provided.

For each new column you’ve specified, the transform will look for the first occurrence of the delimiter, where it will then remove the delimiter and split the column into 2 separate columns.

If you have specified FEWER NEW COLUMNS than the number of occurrences of the delimiter, the column will not split at any subsequent occurrences.

If you have specified MORE NEW COLUMNS than the number occurrences of the delimiter, the new columns will be created but will contain blank values.

As an example, let’s say a restaurant has pulled in a list of all their menu items. The data source has them populated as a single column (with all Menu Items), but you would like to create distinct fields on your entity for each item type, namely for Drinks, Breakfast, and Lunch items. To do so, you can use the Split Column Transform, with the following settings:

  • Column: Menu Items
  • New Columns:
    • Drinks
    • Breakfast
    • Lunch
  • Delimiter: /

This would result in the following transformation. (Notice how the delimiter, /, occurs TWICE, and THREE new columns must be specified to achieve the desired result).

Original Data:

Name Address Menu Items
Turtlehead Tacos 123 Main Street coffee, tea, orange juice/breakfast burrito, pancakes, eggs/tacos, taco salad, combo platter


Transformed Data:

Name Address Menu Items Drinks Breakfast Lunch
Turtlehead Tacos 123 Main Street coffee, tea, orange juice/breakfast burrito, pancakes, eggs/tacos, taco salad, combo platter coffee, tea, orange juice breakfast burrito, pancakes, eggs tacos, taco salad, combo platter


Split into Rows

Use this transform to split your column into one or more rows, based on a specified delimiter (such as a comma).

You’ll need to select the column containing the data that needs to be split and specify the delimiter.

Once applied, all occurrences of the delimiter will be removed and the row will be split at each occurrence. All other columns will repeat the same data values for each new row that is created.

For example, say a healthcare client manages their doctors and associated hospitals via an Excel sheet, where doctors are stored in a single row for each hospital. To create doctor entities for all of doctors, the Split Column transform can split the “Doctor” column into rows, where the delimiter is a comma. All other column data remains unchanged.

Data Before Transform:

Doctor Hospital Specialty
Dr. Cutler, Dr. Smith, Dr. Finjap MGH Cardiology
Dr. Joe, Dr. Sally, Dr. Bob Brigham and Women Emergency


Data After Split into Rows Transform:

Doctor Hospital Specialty
Dr. Cutler MGH Cardiology
Dr. Smith MGH Cardiology
Dr. Finjap MGH Cardiology
Dr. Joe Brigham and Women Emergency
Dr. Sally Brigham and Women Emergency
Dr. Bob Brigham and Women Emergency


Fill in Empty Cells

This transform will fill in a static value for any cell where a blank is present.

First, select the column (or columns) for which to apply the transform. You can optionally select “All Columns” as well, which will also automatically apply the transform to any new columns added in the future.

Next, specify the static value to apply to your data set. Anywhere an empty cell is present in the specified column(s), it will be replaced by the specified value.

Map Publisher Categories

Use this transform if you are pulling in Listings data from a supported publisher to properly map your categories.

An example use case is using the Google Business Profile source to fetch your Location data from the Google API. The API will return the Google category IDs, but you’ll need to map those IDs to the corresponding Yext IDs in order to properly populate your categories on your Location entities.

Select the column (or columns) for which to apply the transform. You can optionally select “All Columns” as well, which will also automatically apply the transform to any new columns added in the future.

Next Specify the publisher that corresponds to your source data. In the example above, choose Google Business Profile as your publisher.

Finally, the transform will return the mapped category IDs.

If your cells contain lists of category IDs, the transform is able to ingest the entire list and return the transformed list.

Feedback