
Answer-first summary for fast verification
Answer: BUILD_STAGE_FILE_URL, BUILD_SCOPED_FILE_URL
The question asks for a function that generates a Snowflake-hosted file URL for a staged unstructured data file using the stage name and relative file path as inputs. BUILD_STAGE_FILE_URL (A) is the correct function for this purpose, as it creates a URL to access files in internal stages, which are hosted by Snowflake. BUILD_SCOPED_FILE_URL (C) is also correct because it generates a scoped URL for files in internal stages, providing temporary, secure access. The community discussion shows strong consensus for A (100% of answers) and mentions that both A and C are correct, with BUILD_SCOPED_FILE_URL specifically noted as generating a 'Snowflake file URL' that is scoped. GET_ABSOLUTE_PATH (B) returns the absolute path of a file but does not generate a URL. GET_PRESIGNED_URL (D) is used for external stages (e.g., cloud storage) to generate pre-signed URLs, not for Snowflake-hosted URLs from internal stages.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.