Use these views as a resource for all of your Yext Knowledge Graph data. 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 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 Query
Get all active entities for a given account.
select
entity_id,
resource_name,
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.
| 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 |
display_name_plural | VARCHAR | The plural form of the entity type display name, if applicable |
resource_name | VARCHAR | The external Entity Type ID |
description | VARCHAR | A user-defined description of the entity type |
Sample Query
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 |
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 |
profile_locale | VARCHAR | The locale of the profile |
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. A field with an embedded field, such as: “Restaurants near [[c_city]]“, the field_raw_value will contain “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 would be: “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 |
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 |
archived | BOOLEAN | Whether the entity profile associated with the field is archived |
field_size | NUMBER | The raw size of the field, in bytes |
truncated | BOOLEAN | Whether the raw or rendered field value is truncated |
Sample Query
Get a full history of an entity's profile updates for the primary entity profile.
select
entities.entity_id,
entities.resource_name as entity_resource_name,
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 descFolders
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 Query
Get all folders for a given account.
select
folder_id,
parent_folder_id,
name,
resource_name,
created_timestamp
from content.foldersNon-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 |