This repository contains code and documentation for the Snowflake assignment.
- The Snowflake warehouse used for this assignment is named assingment_wh .
- The database utilized in this assignment is called assingment_db under and schema my_schema.
The CSV file used in this assignment is named emp_assignment.csv. It contains the data required for the loading.
An external stage table was created so that using Amazon S3 we can get the data back . The stage table provides a way to load data from files stored in an S3 bucket directly into Snowflake.
Name: my_emp_stage for internal staging , my_emp_external_stage for external staging
.
├── src
├── assingment.sql # Source files (containing .sql file)
├── data
├── emp_assingment.csv # contains emp_assingment.csv dataset
└── README.md
- According to the sql commands written in ./src/assingment.sql we have created warehouse,database and schema
- After that according to question requirements, created different roles and assinged grants accordingly
- Using admin role run all the queries according to the comments (sometimes we need accountadmin to grant privileges to admin)
- Created Table and loaded data from internal and external stages as mentioned above.
- for internal staging
![Screenshot 2024-04-10 at 12 15 43 PM](https://private-user-images.githubusercontent.com/76955127/321135569-31500a87-3c21-46f5-833b-cc2127af3198.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwNzg0NTQsIm5iZiI6MTcyNjA3ODE1NCwicGF0aCI6Ii83Njk1NTEyNy8zMjExMzU1NjktMzE1MDBhODctM2MyMS00NmY1LTgzM2ItY2MyMTI3YWYzMTk4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDE4MDkxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFjZDVlZTcyMzM3MWJlZjRmZjhjYjRjNzIwODJiMjMxNjAxMDc1Y2NlYTNkMjU3NjgyMTBhNmFkNzViYTI3MDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gExDLs90dSw-mf1CPsSlox-Mxq024FDzFfxh__RGGIg)
![Screenshot 2024-04-04 at 3 35 14 PM](https://private-user-images.githubusercontent.com/76955127/321137321-6475da55-60c5-46bb-8383-81cc528ddba0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwNzg0NTQsIm5iZiI6MTcyNjA3ODE1NCwicGF0aCI6Ii83Njk1NTEyNy8zMjExMzczMjEtNjQ3NWRhNTUtNjBjNS00NmJiLTgzODMtODFjYzUyOGRkYmEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDE4MDkxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJhMjFkMDY1YzA2YzExODEwNjQyZTBhYzBhZTg2OWMwZWU2NGRlMTg1OTQxMWZmNjIxNmRkZjdiODM3YmIxNWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YP_vuVJGo5WkXvVscCH9yJ-sOPkkJ5r2132A7t5n8Dk)