What happens to the SQL that Cortex Analyst generates?
- Exam domain
- Text to SQL with Cortex Analyst
- Difficulty
- Medium
- In this mock
- 5 questions on this domainPractise this domain
Why D is the answer
It is executed against Snowflake to return the answer
Snowflake says Cortex Analyst turns questions into SQL and that the generated queries are executed against the Snowflake engine.
Remember: Analyst writes and runs SQL.
In detail
- Question to SQL.
- SQL runs in Snowflake.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. It is only shown to the user, who must run it by handWrong
Users do not have to run it by hand.
B. It is sent to an external database, because Analyst cannot run queries in SnowflakeWrong
Queries run in Snowflake.
C. It is stored in a vector storeWrong
SQL is not stored as embeddings.
D. It is executed against Snowflake to return the answerRight
Analyst writes and runs SQL.
Use case
An illustrative scenario, not a real incident.
Illustrative: a manager asks "top five regions by margin this quarter" and gets a table back.
See it in different ways
sequenceDiagram participant P0 as User participant P1 as Cortex Analyst participant P2 as Snowflake engine P0->>P1: question P1->>P2: generated SQL P2-->>P1: rows P1-->>P0: answer
How to read this chart
- 1. User sends "question" to Cortex Analyst.
- 2. Cortex Analyst sends "generated SQL" to Snowflake engine.
- 3. Cortex Analyst gets a reply from Snowflake engine: "rows".
- 4. User gets a reply from Cortex Analyst: "answer".
flowchart LR S0["Ask"] --> S1["Generate SQL"] --> S2["Execute"] --> S3["Return results"]
How to read this chart
- Read it in order: Ask, then Generate SQL, then Execute, then Return results.