snowflake-cloud-data-platformsnowsql

Adding escape sequence for space in Snowflake PUT command


I have been trying to load a file into Snowflake using PUT but I am getting an error due to space in the folder name.

PUT file://Y:/AMI Control/file.csv  @MS_FILE_LND
AUTO_COMPRESS=FALSE

I have tried using \ escape sequence and enclosing the entire path in quotes but it doesn't seem to be working.


Solution

  • This would work

    For Linux/Mac:

    PUT 'file:///AMI Control/file.csv'  @MS_FILE_LND AUTO_COMPRESS=FALSE
    

    For Windows:

    PUT 'file://Y:\AMI Control\file.csv'  @MS_FILE_LND AUTO_COMPRESS=FALSE