Why would I choose to create an external stage in Snowlflake when I can simply copy values into a table directly?
For instance, if I can do this:
create or replace TABLE EXAMPLE_DB.PUBLIC.USERS (
ID INT,
FIRST_NAME VARCHAR,
LAST_NAME VARCHAR,
EMAIL VARCHAR
);
copy into EXAMPLE_DB.PUBLIC.USERS
from s3://mybucket/users.csv
file_format = (
type = csv
field_delimiter = ','
skip_header = 1
);
Why would I ever decide to take the intermediate step of creating an external stage as in:
create or replace STAGE EXAMPLE_DB.PUBLIC.USER_STAGE
url='s3://mybucket';
copy into EXAMPLE_DB.PUBLIC.USERS
FROM @STAGE EXAMPLE_DB.PUBLIC.USER_STAGE
file_format= (type = csv field_delimiter=',' skip_header=1)
files = ('users.csv');