Skip to content

Instantly share code, notes, and snippets.

@leoricklin
Last active October 8, 2022 01:57
Show Gist options
  • Save leoricklin/6572c51ae5ddd31d613f1b64aa8e0785 to your computer and use it in GitHub Desktop.
Save leoricklin/6572c51ae5ddd31d613f1b64aa8e0785 to your computer and use it in GitHub Desktop.

Snowflake DW

Temporary tables only exist within the session in which they were created and persist only for the remainder of the session. As such, they are not visible to other users or sessions. Once the session ends, data stored in the table is purged completely from the system and, therefore, is not recoverable, either by the user who created the table or Snowflake.

Snowflake supports creating transient tables that persist until explicitly dropped and are available to all users with the appropriate privileges. Transient tables are similar to permanent tables with the key difference that they do not have a Fail-safe period. As a result, transient tables are specifically designed for transitory data that needs to be maintained beyond each session (in contrast to temporary tables), but does not need the same level of data protection and recovery provided by permanent tables.

Introduction to Developing Applications in Snowflake — Introduction to developing applications in Snowflake.

Overview of Connectors, Drivers, and Client APIs — Information about the connectors, drivers, and client APIs that you use to develop client applications that connect to Snowflake.


Overview of the Ecosystem

Loading Data into Snowflake

Overview of Data Loading
Summary of Data Loading Features
Data Loading Considerations
Using File Formats
Examples

Preparing to Load Data

Querying Metadata for Staged Files
Transforming Data During a Load

Unloading Data from Snowflake

Overview of Data Unloading
Unloading into a Snowflake Stage

Using snowflake



** Managing Security in Snowflake


** General Reference


*** Transactions

https://docs.snowflake.net/manuals/sql-reference/transactions.html

  • Scope of a Snowflake Transaction
  • Isolation Level
  • Resource Locking
  • Transaction Commands and Functions
  • Aborting Transactions

*** Information Schema

https://docs.snowflake.net/manuals/sql-reference/info-schema.html

SQL Command Reference

https://docs.snowflake.net/manuals/sql-reference/sql-all.html

[
WITH
      <cte_name1> [ ( <cte_column_list> ) ] AS ( SELECT ...  )
  [ , <cte_name2> [ ( <cte_column_list> ) ] AS ( SELECT ...  ) ]
  [ , <cte_nameN> [ ( <cte_column_list> ) ] AS ( SELECT ...  ) ]
]
SELECT ...

SQL Function

Good example will be: "average_depth" : 21.8698, "partition_depth_histogram" : { "00000" : 0, "00001" : 13849, // there are 13849 partitions with 1 keys inside this partition ...

Stored Procedures

When you query a view like the one you defined above, predicates get pushed down to the individual tables, and in addition only necessary columns (ones referenced by the query) are retrieved. So the view is never fully materialized.

Tutorials

1.Resources

FAQ: HOW TO INGEST & ENRICH IOT DATA AT SCALE INTO SNOWFLAKE WITH APACHE NIFI, https://community.snowflake.com/s/article/How-to-Ingest-Enrich-IoT-Data-at-Scale-into-Snowflake-with-Apache-NiFi

Snowflake & Spark

Snowflake and Sagemaker

2.Tutorial

Follow along with our tutorials to get you up and running with the Snowflake Data Cloud.

Getting started video

  • onboarding

    • Snowflake Overview
    • Snowflake User Interface Walkthrough
    • OK, Snowflake Security Overview
    • OK, Snowflake Data Loading Best Practices
    • OK, Snowflake Administration
    • OK, Support Services
  • adv

    • OK, Snowflake Architecture-Cloud Service
    • OK, Clients and Ecosystem
    • Account Considerations
    • OK, Resource Monitor
    • OK, Backup & Recovery
  • transform

    • Data Sharing in Snowflake
    • SQL Support and Usage in Snowflake
    • OK, Data Warehouse Migration Planning
    • Cloning Data in Snowflake
  • Cloud Data Warehouse Benchmark Redshift vs Snowflake vs BigQuery | DataEngConf SF '18

  • Cloud Analytics Academy Featured Courses for snowflake (https://www.cloudanalyticsacademy.com/)

    • Featured Courses
      • Cloud Data Warehousing for Beginners
      • Analytics in the Cloud--Rising
      • Understanding cloud infrastructure
      • Unifying Your Data and Teams to Solve the Analytics Chaos
    • Cloud Foundation Track
      • Bringing Your Data Together in the Cloud
      • In the Cloud: ELT vs. ETL
      • The Correct Way to Build a Data Lake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment