Streams Overview| Hitchhikers Platform
What is Streams
Streams is the engine which handles delivering data from Yext Source Systems (primarily Knowledge Graph) to Yext’s consumer-facing applications (such as Answers, and Pages). Streams enables powerful use cases, like traversing relationships across entities!
Each system can independently determine which components of Stream configuration they wish to expose to the user. For example, Streams Endpoints, exposes a property called stream which contains all of the configuration for a Stream. However, Answers handles Stream configuration implicitly, under-the-hood; a user only needs to interact with their Answers configuration, and the Answers system will automatically generate a Stream with the relevant information.
One crucial point is that the Stream configuration is always handled in the context of the downstream application; users will never configure a Stream independently of a downstream system.
What Makes Up a Stream?
As alluded to above, in some Yext systems, users will need to define a Stream so that the application they are configuring can access relevant data. Currently, users define Streams explicitly when configuring:
- Streams Endpoints (Schema Reference 2)
- Sites (Stream per Template)
When configuring a Stream for these systems, it’s important to understand what the various properties mean!
A Stream is primarily composed of the following properties:
|Source||The source system from which the Stream will fetch data. The source defines the type of records which Streams will produce.
For example, if the source is Knowledge Graph, Streams will produce a record per entity. If the source is Reviews, Streams will produce a record per review.
In most cases, the source of a Stream will be Knowledge Graph.
|Filter||Any filter which should be applied to the data streamed from the source.
Valid filters vary based on the selected source. See the source-specific sections below.
|Localization||Only relevant for Knowledge Graph. The list of localization codes to stream records for. By default, the primary locale of the entities will be included in Streams.
For example, if I wished to receive the Spanish localized version my entities, I would specify “locales” = [“es”] in my localization property.
|Any valid BCP-47 Locale identifier.|
|Transform||A list of valid transforms.||Any of:
The following built-in transforms:
|Fields||The set of fields which should be included in the Stream.||See the fields section below!|
Configuring a Stream
Based on the description above, the general guidelines when configuring a Stream are:
- Choose a source (typically KG)
- Choose a filter (based on your source)
- Select the fields you wish to include in your Stream
- Optionally, specify any localization behavior
- Optionally, specify any transforms
As you can see above, the first step is always to determine the correct Streams source. In almost all cases, your source should be Knowledge Graph, since KG is where all of your entity data is stored.
Once you select your source, you can choose your filter and fields to Stream. Since both filters and fields are source-specific, they will be covered separately in the relevant sections below.