filmov
tv
Read server-side encrypted file in Snowflake | AWS Data File Encryption support in Snowflake
Показать описание
Prerequisite:
----------------------
AWS KMS, Client/Server Side Encryption, CMK, Data Key | Demo
Configuring a Snowflake Storage Integration to Access Amazon S3
Working with JSON in Snowflake | Schema on Read
Documentation Link:
----------------------------------
Code:
-----------
--drop database if required
drop database if exists ramu;
--Create Database
create database if not exists ramu;
--use the database
use ramu;
create OR REPLACE table json_testing_with_array(jsoncolumntesting variant);
--create json format
create or replace file format json_format_array
type = 'json' STRIP_OUTER_ARRAY=TRUE;
create or replace stage ext_json_stage_array
URL = 's3://{}/'
credentials=(aws_key_id=''
aws_secret_key='')
file_format = json_format_array ;
--check the data present in S3
list @ramu.PUBLIC.ext_json_stage_array;
copy into json_testing_with_array from @ramu.PUBLIC.ext_json_stage_array;
select * from json_testing_with_array;
create or replace stage ext_json_stage_array
URL = 's3://{}/'
credentials=(aws_key_id=''
aws_secret_key='')
file_format = json_format_array
encryption=(type='AWS_SSE_KMS' kms_key_id = '');
VVI:
-------
Please clean up the used resources when not in use , otherwise , it might bring unnecessary cost
Check this playlist for more AWS Projects in Big Data domain:
----------------------
AWS KMS, Client/Server Side Encryption, CMK, Data Key | Demo
Configuring a Snowflake Storage Integration to Access Amazon S3
Working with JSON in Snowflake | Schema on Read
Documentation Link:
----------------------------------
Code:
-----------
--drop database if required
drop database if exists ramu;
--Create Database
create database if not exists ramu;
--use the database
use ramu;
create OR REPLACE table json_testing_with_array(jsoncolumntesting variant);
--create json format
create or replace file format json_format_array
type = 'json' STRIP_OUTER_ARRAY=TRUE;
create or replace stage ext_json_stage_array
URL = 's3://{}/'
credentials=(aws_key_id=''
aws_secret_key='')
file_format = json_format_array ;
--check the data present in S3
list @ramu.PUBLIC.ext_json_stage_array;
copy into json_testing_with_array from @ramu.PUBLIC.ext_json_stage_array;
select * from json_testing_with_array;
create or replace stage ext_json_stage_array
URL = 's3://{}/'
credentials=(aws_key_id=''
aws_secret_key='')
file_format = json_format_array
encryption=(type='AWS_SSE_KMS' kms_key_id = '');
VVI:
-------
Please clean up the used resources when not in use , otherwise , it might bring unnecessary cost
Check this playlist for more AWS Projects in Big Data domain:
Комментарии