Selectors | Yext Hitchhikers Platform

Overview

Data selectors allow you to extract a set of data from a specified path in the data source. This data is the basis for the connector configuration, to then be transformed and loaded into Yext Content.

Each selector has a header and a path.

The header is used to name the column of data. This represents what you see in the preview table and is used to reference the column of data in any subsequent transforms as well as the mapping stage. The header must be unique across all columns.

The path represents the actual path to the data you want to extract. The supported paths will vary depending on the format of the ingested data.

Unlike the header, the path does not need to be unique across columns. The same data can be extracted more than once to be used in multiple different columns.

book
Note
Paths are not validated against the source data. This means that a selector may be added even if it does not represent a valid path containing data, which will result in an empty column. This is to allow for cases where the same connector configuration should be used across different source data sets where the format varies.

Adding Default Selectors

Default selectors make it easy to quickly extract data from a source. Default selectors are determined using the following logic based on the format of the source data:

JSON

Any leaf nodes that are detected within the page of the API response populating the preview table will be added, as long as the value is not null for at least one leaf node.

Headers and paths have the same value.

HTML

This also applies to the Crawler source . CSS or XPATH notation can be used to extract data. Default selectors include Page Title, Page ID, and Page URL.

.XLS/CSV

If HasHeaderRow=true, all detected columns will be extracted, using the value in the first row as the selector. If duplicate header names are detected, the selector will instead default to the Alphabetic Index for CSV files and the Numeric Index method for .xlsx files, and the header name will have a number appended to ensure its name is unique (for example, if two “Name” columns are detected, they will become “Name[0]” and “Name[1]“).

If HasHeaderRow=false, all detected columns will be extracted, using the Alphabetic Index method for .xls files, and the Numeric Index method for .csv files.

If you are merging sheets vertically, default headers are extracted based on the first sheet. If you are merging sheets horizontally, headers across all sheets will be extracted, and headers cannot be duplicated across sheets.