4. Snowflake#

image.png

  • Datawarehouse

  • Saas

  • Inbuilt scalable Computing power

  • Uses cloud to store the data in the Backend

    • If AWS - S3

    • If Azure - Azure Blob Storage

  • Automatic Caching of results in Caching layer

  • Can be connected to JDBC,ODBC drivers as well

5. How Data is processed under the Hood in Snowflake#

  • You can Check the Execution Plan of the Query

    • Click on History>Query ID

      • Execution Plan opens with Details and PRofile Page

6. Creating a Database#

CREATE DATABASE First_DB

  • It will create empty database

7. Creating a Table in our Database#

CREATE TABLE First_Table( First_name String, address String );

  • Refresh the Database

  • It will create

    • Look into Public>Tables (Public is schema)

8. Loading the Data into the Table#

  • You need to switch to Staging area and connect to S3 bucket using URL (can be csv)

  • Create the Staging Area

    • CREATE OR REPLACE staging_area URL='http://demo'

  • Load the data

    • COPY INTO FIRST_TABLE FROM url file_format=(type-csv field_delimiter=',' skip_header=1)

9. Querying our Table#

Select *  from First_Table

10. Limitation of Snowflake#

  • If multiple queries,you can’t check the syntax errors until the execution is done