Configuring a Snowflake Storage Integration to Access Amazon S3











>> YOUR LINK HERE: ___ http://youtube.com/watch?v=Mje7AEpxsLA

Code: • ---------- • --drop database if required • drop database if exists ramu; • --Create Database • create database if not exists ramu; • --use the database • use ramu; • --Table Creation • create table if not exists video (sepal_length number(10,4),sepal_width number(10,4),petal_length number(10,4) ,petal_width number(10,4),class varchar(200)); • --file-format creation • create or replace file format my_csv_format • type = csv field_delimiter = ',' skip_header = 1 • field_optionally_enclosed_by = ' ' • null_if = ('NULL', 'null') • empty_field_as_null = true; • // Create storage integration object • create or replace storage integration s3_int • TYPE = EXTERNAL_STAGE • STORAGE_PROVIDER = S3 • ENABLED = TRUE • STORAGE_AWS_ROLE_ARN = '' • STORAGE_ALLOWED_LOCATIONS = ('s3://{your-bucket-name}/{your-path}/', 's3://{your-bucket-name}/{your-path}/') • COMMENT = 'This an optional comment' ; • • • // See storage integration properties to fetch external_id so we can update it in S3 • DESC integration s3_int; • • --stage creation • create or replace stage ramu.PUBLIC.snow_simple url= s3://{your-bucket-name}/{your-path}/ • STORAGE_INTEGRATION=s3_int • file_format = my_csv_format; • list @ramu.PUBLIC.snow_simple; • --copy command • copy into ramu.PUBLIC.video from @ramu.PUBLIC.snow_simple • FILE_FORMAT=(FORMAT_NAME=my_csv_format) ON_ERROR=CONTINUE; • • select * from video; • Check this playlist for more AWS Projects in Big Data domain: •    • Demystifying Data Engineering with Cl...  

#############################









Content Report
Youtor.org / Youtor.org Torrents YT video Downloader © 2024

created by www.mixer.tube