Internal Named Stage
Internal Named stages are database objects that provide the greatest degree of flexibility for data loading. They overcome the limitations of both user and table stages.
- Named stages are accessible by all the users with appropriate privileges.
- The data from Named stages can be loaded into multiple tables.
The internal named stages should be created manually unlike user and table stages. you can create a named Internal stage using either the web interface or SQL.
SQL to create internal Named Stage :
CREATE TRAINING.DEMO.STAGE emp_stg
DIRECTORY = ( ENABLE = true );
Steps to create named internal stage using classic Web UI:
- Navigate to Database > Database Name > Stages
- Click Create , Select Snowflake managed Storage and Click Next
- Enter the name of the stage, Select Schema and click Finish
Steps to Create named inter stage using snowsite :
uploading file to internal stage :
Listing files from internal stage :
list @<stage_name>;
list @TRAINING.DEMO.EMP_STG/;
remove files from Internal stage .
Remove @TRAINING.DEMO.EMP_STG;
if you want to remove any specific file from specific folder within it you can do that by specifying the path of it.
REMOVE TRAINING.DEMO.EMP_STG/emp.csv;


Comments
Post a Comment