SNOWPRO-CORE practice question 25 of 35

True or False: Snowpipe via REST API can only reference External Stages as source.

Full set: 628 questions

Domain Performance Management

Answer options
A: True
B: False
Correct Answer:
FALSE
Explanation

The Snowpipe REST API is used to call the insertFiles endpoint, which notifies a pre-configured pipe object to begin loading a specified list of files. The source location (the stage) is defined within the CREATE PIPE statement's COPY INTO clause, not by the REST API call itself. The CREATE PIPE command supports loading from both internal (including user and table stages) and external stages. Therefore, the Snowpipe REST API can be used to ingest data from files located in either an internal or an external stage.

Why Incorrect

The statement "True" is incorrect because it imposes a false limitation. While the auto-ingest feature of Snowpipe (which uses cloud event notifications) requires an external stage, the REST API method is more flexible. It simply triggers a pipe, and that pipe can be configured to source data from an internal stage.

References

1. Snowflake Documentation: CREATE PIPE

The official syntax for the CREATE PIPE command explicitly shows that the FROM clause in the embedded COPY statement can reference an internal stage, an external stage, or a user stage.

Source: Snowflake Documentation, "CREATE PIPE".

Reference: In the "Syntax" section, the copystatement is defined as COPY INTO FROM { @[.][/] | @[.][/] | @~[/] }. This syntax confirms that internal stages are a valid source.

2. Snowflake Documentation: "Calling the Snowpipe REST Endpoints to Load Data"

This document describes the process of using the REST API. It states that the insertFiles endpoint "notifies Snowpipe that a set of data files is ready to be loaded from the stage defined in the pipe." This clarifies that the API triggers a pipe, and the pipe's definition dictates the source stage.

Source: Snowflake Documentation, "User Guide > Data Loading > Loading Continuously Using Snowpipe > Automating Snowpipe with REST Endpoints".

Reference: Section "insertFiles Endpoint".

3. Snowflake Documentation: "Overview of Snowpipe"

This page distinguishes between the two methods for triggering Snowpipe. The first method, "Automating Snowpipe using cloud messaging," is tied to external stages. The second method is "Calling Snowpipe REST endpoints," which is presented as a distinct alternative for triggering a data load. This separation implies different operational capabilities and requirements.

Source: Snowflake Documentation, "User Guide > Data Loading > Loading Continuously Using Snowpipe > Introduction to Snowpipe".

Reference: Section "Snowpipe Methods for Loading Data".

Scroll to Top