SnowPro Specialty: Gen AI exam dumps

SnowPro Specialty: Gen AI practice question 65 of 287

SnowPro® Specialty: Gen AI. Expert level, Snowflake. Free question with the correct answer and a full explanation.

SnowPro Specialty: Gen AI Question 65

Single answerStored in YAML files in a stage

A data engineering team wants to manage Snowflake Cortex Search service definitions as code. They keep the service specification in a YAML file in an internal stage so deployments can be versioned and promoted across environments. A developer needs to create a new Cortex Search service directly from the staged YAML definition during deployment. Which approach should they use?

  1. A

    Run CREATE CORTEX SEARCH SERVICE and reference the YAML file in the stage by using the FROM '@stage/path/service.yaml' clause

  2. B

    Run EXECUTE IMMEDIATE FROM '@stage/path/service.yaml' so Snowflake reads the YAML and creates the Cortex Search service

  3. C

    Load the YAML file into a VARIANT column, then call CREATE CORTEX SEARCH SERVICE USING VARIANT

  4. D

    Copy the YAML file from the stage into a notebook, because Cortex Search services can only be created from notebook-defined specifications

Show answer and explanation

Correct answer: A

Explanation

For configuration-as-code workflows, Snowflake supports storing object specifications in YAML files in a stage and creating supported objects directly from those staged definitions. For Cortex Search, the correct deployment method is to use the CREATE CORTEX SEARCH SERVICE statement with the FROM clause pointing to the staged YAML file. This enables version-controlled, repeatable deployments across dev, test, and prod environments. A common misconception is to use EXECUTE IMMEDIATE FROM, but that feature is meant for SQL scripts, not YAML specifications. Another misconception is that the YAML must first be loaded into a table or recreated manually in a notebook; neither is required when the object supports staged YAML definitions. Candidates should distinguish between declarative object deployment from YAML in a stage and procedural execution of staged SQL files.

  • A. Correct.

    Correct. Snowflake supports creating certain objects, including Cortex Search services, from a YAML specification stored in a stage by using the appropriate CREATE ... FROM syntax. This is the intended deployment pattern when teams want configuration-as-code and environment promotion using staged YAML files.

  • B. Incorrect.

    Incorrect. EXECUTE IMMEDIATE FROM is for executing SQL scripts stored in stages, not for interpreting YAML object specifications. A YAML file is not treated as executable SQL, so this approach reflects a common confusion between staged SQL deployment scripts and staged declarative object definitions.

  • C. Incorrect.

    Incorrect. Snowflake does not provide a CREATE CORTEX SEARCH SERVICE USING VARIANT pattern for consuming a YAML definition already loaded into a table. The object definition is expected through the supported DDL syntax that references the staged file directly, not by passing a VARIANT value from a table.

  • D. Incorrect.

    Incorrect. Notebooks can be used for development workflows, but they are not required for Cortex Search service creation. Snowflake supports declarative definitions stored in stages specifically to enable repeatable deployments without depending on notebook-based creation.

Timed practice exam

Take a SnowPro Specialty: Gen AI practice test under exam conditions

55 questions in 85 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam