Youtube post data fields are attached to Youtube Comment interactions to allow you to filter and classify Youtube Comments based on parent post attributes.
This guide explains how comment hydration works in the context of Youtube interactions.
When we receive interactions from the Youtube source:
- All Youtube
videotype interactions are added to our Youtube context cache.
- As we receive Youtube
commenttype interactions, the context cache is checked, based on the Youtube video id, to see if the parent video post is stored. If so, the context builder adds data fields from the parent video post to the comment interaction.
- Interactions are passed down the pipeline as normal for filtering.
Which posts are cached?
We cache every Youtube
video type post we receive.
How long are posts cached?
This varies based on engagement. We evict items from the context cache on a Least Recently Used (LRU) basis. This means that Youtube videos which continue to receive high levels of engagement, long after they were written to the cache, will be persisted as long as they continue to receive engagements.
Let's look at an example to explain comment hydration in practice.
If you're looking to analyze comments on videos about cars, or comments mentioning cars, you could use the following CSDL:
youtube.type == "comment" AND ( youtube.content CONTAINS_ANY "car, cars" OR youtube.video.content CONTAINS_ANY "car, cars" )