Content Data Dictionary | Yext Hitchhikers Platform
Use these views as a resource for all of your Yext Content. You can view entities and their metadata, such as associated folders, entity labels, and profile field data. You can also view a log of both entity profile field and non-profile (e.g. folder) updates.
Entities
content.entities
This view contains general information about each active entity associated with your business.
Column | Data Type | Description |
---|---|---|
entity_id |
NUMBER |
The immutable numeric internal UID for an entity |
resource_name |
VARCHAR |
The external Entity ID. This is the primary user-facing identifier for an entity defined in Config-as-Code (CaC) |
business_id |
NUMBER |
The numeric identifier for the account that the entity belongs to |
entity_type_id |
NUMBER |
The immutable numeric identifier (UID) for the entity type |
folder_id |
NUMBER |
The immutable numeric identifier (UID) for the folder the entity belongs to, if applicable |
label_ids |
ARRAY |
An array containing the numeric identifier (UID) for all labels associated with the entity |
label_names |
ARRAY |
An array containing the display names for all labels associated with the entity |
created_timestamp |
TIMESTAMP_NTZ |
The timestamp of the entity’s creation |
country |
VARCHAR |
The country associated with the entity |
Sample Queries
Get all active entities for a given account.
select
entity_id, -- The internal entity UID
resource_name, -- The external entity ID
entity_type_id,
folder_id,
created_timestamp,
country
from content.entities
Entity Types
content.entity_types
This view contains general information about all of your entity types, including both internal and external IDs and display names.
Column | Data Type | Description |
---|---|---|
business_id |
NUMBER |
The numeric identifier for the account that the entity belongs to |
entity_type_id |
NUMBER |
The immutable numeric internal UID for an entity |
display_name |
VARCHAR |
The external-facing display name of the entity type, i.e. Locations |
display_name_plural |
VARCHAR |
The plural form of the entity type display name, if applicable |
resource_name |
VARCHAR |
The external Entity Type ID. This is the primary user-facing identifier for an entity type defined in Config-as-Code (CaC) |
description |
VARCHAR |
A user-defined description of the entity type |
Sample Queries
Get all active entities for a given account and their types.
select
entities.entity_id, -- The internal entity UID
entities.resource_name as entity_resource_name, -- The external entity ID
display_name as entity_type_name, -- The display name of the entity type
display_name_plural,
entity_types.resource_name as entity_type_resource_name, -- The external entity type ID
description,
created_timestamp,
country
from content.entities
join content.entity_types using (business_id, entity_type_id)
Labels
content.labels
This view contains general information about all of the labels associated with your active entities.
Column | Data Type | Description |
---|---|---|
label_id |
NUMBER |
The numeric identifier belonging to an entity label |
business_id |
NUMBER |
The numeric identifier for the account that the label belongs to |
name |
VARCHAR |
The external-facing label display name |
internal |
BOOLEAN |
Whether the label is classified as internal-only |
resource_name |
VARCHAR |
The external Label ID. This is the primary user-facing identifier for a label defined in Config-as-Code (CaC) |
Sample Queries
Get all active entities, their entity types, and their associated labels, if they exist.
select
entities.entity_id, -- The internal entity UID
entities.resource_name as entity_resource_name, -- The external entity ID
display_name as entity_type_name, -- The display name of the entity type
display_name_plural,
entity_types.resource_name as entity_type_resource_name, -- The external entity type ID
description,
name as label_display_name, -- The display name of the label
internal,
labels.resource_name as label_resource_name, -- The label API name
created_timestamp,
country
from content.entities
join content.entity_types using (business_id, entity_type_id)
join content.entity_labels
on (entities.business_id = entity_labels.business_id and entities.entity_id = entity_labels.entity_id)
join content.labels
on (entities.business_id = labels.business_id and entity_labels.label_id = labels.label_id)
Profile Field Data (All Time)
content.profile_field_data_cdc
This view contains a full history of entity profile updates for all active entities associated with your business, at the profile level.
Column | Data Type | Description |
---|---|---|
business_id |
NUMBER |
The numeric identifier for the account that the entity belongs to |
entity_id |
NUMBER |
The numeric identifier for the entity that was updated |
profile_id |
NUMBER |
The numeric identifier for the entity profile that was updated. An entity can have multiple profiles. It can have a primary profile and a secondary profile, for example. |
profile_locale |
VARCHAR |
The locale of the profile. Examples include en , de , ja , etc. Multilingual experiences typically will have one entity profile per locale. There may be different settings and product feature availability depending on locale |
is_primary_profile |
BOOLEAN |
Whether the updated profile is the associated entity’s primary profile |
field_id |
VARCHAR |
The alphanumeric identifier for the entity profile field that was updated |
field_resource_name |
VARCHAR |
The external Field ID. This is the primary user-facing identifier for a field defined in Config-as-Code (CaC) |
field_raw_value |
VARIANT |
The raw input of the field update, only visible to internal users. For instance, for an embedded ‘madlib’ field, such as “question”: “Restaurants near [[c_city]]“, the field_raw_value will contain “question”: “Restaurants near [[c_city]]” |
field_rendered_value |
VARIANT |
The rendered field update value, visible to external users. Using the above embedded field example, the field_rendered_value could be “question”: “Restaurants near Menlo Park” |
updated_timestamp |
TIMESTAMP_NTZ |
The timestamp at which the update happened |
operation_id |
NUMBER |
The numeric identifier for an update operation |
operation_started_timestamp |
TIMESTAMP_NTZ |
The timestamp at which the update operation was started. Note that an operation can span multiple update requests |
correlation_id |
VARCHAR |
The alphanumeric identifier of the activity that triggered the update |
action |
VARCHAR |
The endpoint or update intention |
event_type |
VARCHAR |
Categorization for the concrete profile actions. Note: ENTITY_CREATED , ENTITY_DELETED , and FIELD_UPDATED event types will be moved to the entity_data_cdc view in the near future” |
archived |
BOOLEAN |
Whether the entity profile associated with the field is archived. This will always be TRUE - Yext Data Sharing does not include any archived entity profiles” |
field_size |
NUMBER |
The raw size of the field, in bytes |
truncated |
BOOLEAN |
Whether the raw or rendered field value is truncated |
Sample Queries
Get a full history of an entity’s profile updates, for the primary entity profile.
select
entities.entity_id, -- The internal entity UID
entities.resource_name as entity_resource_name, -- The external entity ID
profile_id,
profile_locale,
field_id,
field_resource_name,
field_raw_value,
field_rendered_value,
updated_timestamp
from content.profile_field_data_cdc
join content.entities using (entity_id, business_id)
where entity_id = 1234567
and is_primary_profile
order by updated_timestamp desc
Get only the most recent version of a given entity’s primary profile. This is a more complex query that requires an inner query to fetch the most recent update for each field on the entity profile, because this view contains a full edit history of each field.
select
business_id,
entity_id,
profile_id,
profile_locale,
is_primary_profile,
field_id,
field_resource_name,
field_raw_value,
field_rendered_value,
updated_timestamp
from content.profile_field_data_cdc
where profile_id not in
(
select profile_id
from content.profile_field_data_cdc
where archived
)
qualify row_number() over (partition by entity_id, profile_id, field_id order by updated_timestamp desc) = 1
and (field_id is null or field_rendered_value is not null)
and entity_id = 1234567
and is_primary_profile
Folders
content.folders
This view contains general information about any folders, including nested folders.
Column | Data Type | Description |
---|---|---|
folder_id |
NUMBER |
The numeric identifier for the folder |
business_id |
NUMBER |
The numeric identifier for the account that the folder belongs to |
name |
VARCHAR |
The external-facing folder display name |
parent_folder_id |
NUMBER |
For nested folders, the unique internal-facing ID of the parent folder |
resource_name |
VARCHAR |
The external Folder ID. This is the primary user-facing identifier for a folder defined in Config-as-Code (CaC) |
created_timestamp |
TIMESTAMP_NTZ |
The timestamp at which the folder was created |
Sample Queries
Get all folders for a given account.
select
folder_id,
parent_folder_id,
name,
resource_name,
created_timestamp
from content.folders
Get all entities that belong to a given folder.
select
entity_id,
resource_name,
created_timestamp,
country
from content.entities
join content.folders using (business_id, folder_id)
where folder_id = 123456
Non-Profile Entity Data
content.entity_data_cdc
This view contains a full history of entity-level events for non-profile updates associated with all active entities associated with your business. Non-profile fields consist of categories, keywords and folders.
Column | Data Type | Description |
---|---|---|
business_id |
NUMBER |
The numeric identifier for the account that the entity belongs to |
entity_id |
NUMBER |
The numeric identifier for the entity that was updated |
field_id |
VARCHAR |
The alphanumeric identifier for the entity profile field that was updated |
field_resource_name |
VARCHAR |
The external Field ID. This is the primary user-facing identifier for a field defined in Config-as-Code (CaC) |
field_rendered_value |
VARIANT |
The rendered field update value, visible to external users. |
updated_timestamp |
TIMESTAMP_NTZ |
The timestamp at which the field update was started |
correlation_id |
VARCHAR |
The alphanumeric identifier of the activity that triggered the update |
interface |
VARCHAR |
The system making the update |
action |
VARCHAR |
The endpoint or update intention |
event_type |
VARCHAR |
Categorization for the concrete profile actions (ENTITY_CREATED , ENTITY_DELETED , and FIELD_UPDATED ) |
archived |
BOOLEAN |
Whether the entity profile associated with the field is archived. This will always be TRUE - Yext Data Sharing does not include any archived entities |