SNOWPRO-CORE practice question 17 of 35

Which URL provides access to files in Snowflake without authorization?

Full set: 628 questions

Domain Storage and Protection

Answer options
A: File URL
B: Scoped URL
C: Pre-signed URL Correct answer
D: Scoped file URL
Correct Answer:
C. Pre-signed URL
Explanation

A pre-signed URL grants temporary access to a file stored in a Snowflake stage. This URL can be used by any user or application, such as a web browser, to retrieve the file without needing to authenticate with Snowflake. The authorization to access the file is embedded within the URL itself, which is valid for a limited time. This mechanism is specifically designed to allow users who are not authenticated into a Snowflake session to download files.

Why Incorrect

A. File URL: A standard file URL (e.g., @mystage/myfile.csv) is a reference to a file within a stage and requires an active, authorized Snowflake session to be accessed.
B. Scoped URL: A scoped URL provides temporary access to a staged file, but it is restricted to the specific user whose active Snowflake session was used to generate it.
D. Scoped file URL: This is another name for a Scoped URL and carries the same requirement: the user must have an active, authenticated session in Snowflake to use it.

References

1. Snowflake Documentation: SQL Functions > Other Functions > GETPRESIGNEDURL.

Section: GETPRESIGNEDURL

Content: "Generates a pre-signed URL to a staged file... A role that has sufficient privileges can generate a pre-signed URL. The URL can be used by any user or application to retrieve the file." This confirms that the end-user of the URL does not need to be an authenticated Snowflake user.

2. Snowflake Documentation: SQL Functions > Other Functions > BUILDSCOPEDFILEURL.

Section: BUILDSCOPEDFILEURL

Content: "Generates a scoped Snowflake file URL to a staged file... The user must have a current session in Snowflake to use the URL." This explicitly contrasts with a pre-signed URL, highlighting that scoped URLs require an active session.

3. Snowflake Documentation: Downloading files from an internal stage.

Section: Option 2: Downloading files using a web browser

Content: This section details the process of using the GETPRESIGNEDURL function to generate a URL that can be pasted directly into a web browser's address bar to download a file, demonstrating access outside of a Snowflake client.

Scroll to Top