Monday, 18 August 2025

UNLOADING

Syntax:

COPY INTO @stage_name FROM (SELECT col1, col2, col3 FROM table_name)

FILE_FORMAT = (TYPE = CSV)

HEADER = TRUE


Additional Parameters:

SINGLE

Use the SINGLE parameter to specify whether the file will be split into multiple files. The default is set to FALSE which means the data will be split across multiple files


MAX_FILE_SIZE

To define the file size

No comments:

Data Sharing

  1. Create Share CREATE SHARE my_share; 2. Grant privileges to share GRANT USAGE ON DATABASE my_db TO SHARE my_share; GRANT USAGE ...