Trying to do a simple unload of a Snowflake table to internal staging. Creating the stage works just fine:
CREATE OR REPLACE stage dm15152_stage FILE_FORMAT = (TYPE='CSV' COMPRESSION='GZIP')
Stage area DM15152_STAGE successfully created.
But copying the table fails
COPY INTO dm15152_stage FROM DM15152
SQL compilation error: syntax error line 1 at position 29 unexpected 'DM15152'.
The table exists, I can select rows e.g. SELECT * FROM DM15152 LIMIT 10.
I must be doing something wrong, but all of the examples I can find look like this.
Well, the answer seems stupidly simple, but I thought I should post it because it defies the examples I could find. It works by using a path syntax: