Schema:

LOCAL

CORTEX_ANALYST_REQUESTS_V view

The CORTEX_ANALYST_REQUESTS_V view presents Cortex Analyst request log data.

Columns

timestampTIMESTAMP_NTZThe time the request was received.
semantic_model_typeVARCHAR

The data that was used to provide the semantic model.

This value is one of the following:

  • FILE_ON_STAGE: The semantic model was loaded from a semantic model file on a Snowflake stage.
  • SEMANTIC_VIEW: The semantic model was loaded from a semantic view definition.
semantic_model_nameVARCHAR

The name of the semantic model.

  • For models loaded from a stage, this is the fully qualified path to the staged file in the form @db.schema.stage/spec_path.
  • For models loaded from a semantic view, this is the name of the view.
tables_referencedVARIANTAn array containing the fully qualified names of all tables referenced by Cortex Analyst.
request_idVARCHARThe internal/system-generated identifier for the request.
user_idVARCHARThe Snowflake identifier for the user that sent the request.
sourceVARCHAR

A JSON object containing metadata about the request source.

This object has the following fields:

  • agent_request_id: Internal/system-generated identifier for the agent request that generated this request, if any
generated_sqlVARCHARThe SQL statement generated by Cortex Analyst in response to the request’s question.
latest_questionVARCHARThe most recent question sent as part of the request.
request_bodyVARIANT

The full body of the HTTP request.

For the structure of this object, see Request body.

response_bodyVARIANT

The full body of the HTTP response.

For the structure of this object, see Non-streaming response.

response_status_codeNUMBERThe HTTP response code returned to the client.
warningsVARIANTThe list of warnings from Cortex Analyst about the request.
primary_role_nameVARCHARThe name of the primary role used by the user who made the request.
response_metadataVARIANTMetadata containing the response generation details for the request
feedbackARRAY

Array of objects that contain information for all feedback associated with the request.

Feedback objects are identical to the REST API call request body as described in Send feedback.

Required privileges

Accessing the CORTEX_ANALYST_REQUESTS_V view requires one of the following roles:

  • SNOWFLAKE.CORTEX_ANALYST_REQUESTS_VIEWER
  • SNOWFLAKE.CORTEX_ANALYST_REQUESTS_ADMIN