- Categories:
CORTEX_SEARCH_DATA_SCAN¶
This table function returns the data indexed by a Cortex Search service, including the columns defined in the source query and the computed vector embeddings for the search column.
Syntax¶
Arguments¶
Required:
SERVICE_NAME => 'string'The name of a Cortex Search service.
You can specify any of the following:
Unqualified name (
service_name)Partially qualified name (
schema_name.service_name)Fully qualified name (
database_name.schema_name.service_name)
For more information on object name resolution, refer to Object Name Resolution.
Output¶
The function returns all the columns specified in the source query and the embeddings for the search column. The embedding column is of VECTOR data type and is named _GENERATED_EMBEDDINGS_{MODEL_NAME}.
The order of the columns is the same as the order of the columns in the source query with the embedding column appended at the end.
Usage notes¶
Requires OPERATE privilege for Cortex Search. Refer to Access control privileges for more details.
Examples¶
Suppose you have a Cortex Search service named transcript_search_service defined as follows:
For instructions about creating a Cortex Search service, see Cortex Search Overview.
You can use the table function to retrieve the contents for the Cortex Search service transcript_search_service: