Which SQL command will download all the data files from an internal table stage named TBL_EMPLOYEE to a local window directory or folder on a client machine in a folder named folder with space within the C drive?
Which SQL command will download all the data files from an internal table stage named TBL_EMPLOYEE to a local window directory or folder on a client machine in a folder named folder with space within the C drive?
To issue SQL commands for downloading data files from an internal table stage to a local directory on a Windows machine, the correct approach uses the 'GET' command. For Windows paths, when the directory path includes spaces or other special characters, the path must be enclosed in single quotes, and the path separators should be forward slashes (/). Therefore, the correct command is 'GET @%TBL_EMPLOYEE 'file://C:/folder with space/';'.
I think is A, because windows file system use back slash
B. https://docs.snowflake.com/en/sql-reference/sql/get#required-parameters
The internal stage is @%TBL_EMPLOYEE, which is the stage for the table named TBL_EMPLOYEE. The local directory path is file://C:\folder with space\. The space in the folder name must be escaped with a backslash (\).
https://docs.snowflake.com/en/sql-reference/sql/get If the directory path includes special characters, the entire file URI must be enclosed in single quotes. Note that the drive and path separator is a forward slash (/) in enclosed URIs (e.g. 'file://C:/temp/load data' for a path in Windows that includes a directory named load data).
verified from https://docs.snowflake.com/en/sql-reference/sql/get
B is correct. Syntax: GET internalStage file://<local_directory_path> [ PARALLEL = <integer> ] [ PATTERN = '<regex_pattern>'' ] You must include the drive and backslash in the path (e.g. file://C:tempload). If the directory path includes special characters, the entire file URI must be enclosed in single quotes. Note that the drive and path separator is a forward slash (/) in enclosed URIs (e.g. 'file://C:/temp/load data' for a path in Windows that includes a directory named load data).
https://docs.snowflake.com/en/sql-reference/sql/get#required-parameters
Why B in windows machine \ is used for path then it must be A
Just like WSL or other Unix systems accessing Windows, path has Unix separators to access a mounted windows drive as such. /c/folder with space/
A is correct
A because is local machine..... \ . it was linux /
A is correct https://docs.snowflake.com/en/user-guide/data-unload-snowflake#
https://docs.snowflake.com/en/sql-reference/sql/get#required-parameters Windows:-You must include the drive and backslash in the path (e.g. file://C:tempload). If the directory path includes special characters, the entire file URI must be enclosed in single quotes. Note that the drive and path separator is a forward slash (/) in enclosed URIs (e.g. 'file://C:/temp/load data' for a path in Windows that includes a directory named load data).
B correct
B correct