Working with Snowflake External Tables and S3 Examples

Snowflake External tables allow you to access files stored in external stage as a regular table. You can join the Snowflake external table with permanent or managed table to get required information or perform the complex transformations involving various tables. The External tables are commonly used to build the data lake where you access the raw data which is stored in the form of file and perform join with existing tables. Snowflake External Tables As mentioned earlier, external tables access the files stored in external stage area such as Amazon…

Continue ReadingWorking with Snowflake External Tables and S3 Examples
Comments Off on Working with Snowflake External Tables and S3 Examples

How to Create Snowflake Clustered Tables? Examples

Snowflake cloud data warehouse produces create clustered tables by default. However, as the table size grows and DML occurs on the table, the data in some table rows may no longer cluster optimally on desired dimensions. In this article, we will check how to create Snowflake clustered tables to improve the DML query performance. Snowflake Clustered Tables When you create a table and insert records into the Snowflake tables, inserted rows are grouped into continuous storage such as micro-partitions. But, as the table size grows, data in some column may…

Continue ReadingHow to Create Snowflake Clustered Tables? Examples
Comments Off on How to Create Snowflake Clustered Tables? Examples

Snowflake Cloud Data Warehouse Best Practices

Snowflake cloud data warehouse is optimized to work with cloud environments such as AWS, GCP, and Azure. Snowflake data warehouse is fast, reliable and designed for cloud. In this article, we will check what are Snowflake cloud data warehouse best practices. Snowflake Cloud Data Warehouse Best Practices If you follow the Snowflake official documentation. You will find many optimization methods. We have also discussed how to optimize the table structure in my other articles. Following are some of the best practices that you can use when working with Snowflake cloud…

Continue ReadingSnowflake Cloud Data Warehouse Best Practices
Comments Off on Snowflake Cloud Data Warehouse Best Practices

Type of Snowflake Stages – How to Create and Use them?

Snowflake cloud data warehouse architecture is specifically designed to work with the cloud such as Amazon AWS, Google cloud platform and Microsoft Azure. Loading and unloading tables, Snowflake use different methods compared to other relational database. Snowflake uses staging area to store the file that you can in your COPY command. In this article, we will check the types of Snowflake stages, how to create and use them. Types of Snowflake Stages A stage in Snowflake is an intermediate space where you can upload the files so that you can…

Continue ReadingType of Snowflake Stages – How to Create and Use them?
Comments Off on Type of Snowflake Stages – How to Create and Use them?

Snowflake Snowsql Windows System Exit Codes

In my other article, Snowflake Snowsql Exit Codes for Unix/Linux Systems, we have discussed on SnowSQL exit codes for Linux systems. But, many developers prefer to use a Windows system. In this article, we will check Snowflake Snowsql windows system exit codes and how to capture them on a Windows command prompt. Snowflake Snowsql Windows System Exit Codes SnowSQL command line interface for Snowflake is written in pure Python. You can download the msi installer and install same on your Windows machine. The configuration is pretty much similar to that…

Continue ReadingSnowflake Snowsql Windows System Exit Codes
Comments Off on Snowflake Snowsql Windows System Exit Codes

Snowflake Snowsql Exit Codes for Unix/Linux Systems

Snowsql is a command line interface written on the top of the Snowflake Python connector. The interface is a pure Python tool. Similar to many relational database tools, Snowsql also returns several exit codes. In this article, we will check Snowflake Snowsql exit codes for Unix or Linux system. Snowflake Snowsql Exit Codes The Snowsql exit code are very much important when you are working with a script such as ETL/ELT. Snowflake Snowsql exit codes provide the information about the execution status of the SQL queries or commands. SnowSQL returns…

Continue ReadingSnowflake Snowsql Exit Codes for Unix/Linux Systems
Comments Off on Snowflake Snowsql Exit Codes for Unix/Linux Systems

Snowflake rowcount and QueryID of last Executed Query

The best part about Snowflake cloud data warehouse is that it provides almost all feature that are available in other relational databases. The MPP databases such as Teradata provides the number of rows affected by the last SQL statement within its BTEQ files. Similar feature is also available within SnowSQL which is a Snowflake command line interface. In this article, we will check how get rowcount and the queryID of the last executed Snowflake query. Snowflake rowcount and QueryID of last Executed Query SnowSQL includes a set of built-in variables…

Continue ReadingSnowflake rowcount and QueryID of last Executed Query
Comments Off on Snowflake rowcount and QueryID of last Executed Query

Different Snowflake Connectors and Explanation

A Snowflake cloud data warehouse supports connection from many leading programming languages. You can use these connectors and drivers to take advantage of Snowflake's unique capabilities and features. Snowflake supports many third-party and native connectors. In this article, we will check different Snowflake connectors, drivers and third-party tools. Different Snowflake Connectors Following is a list of different connectors and drivers available in Snowflake. SnowSQL - Snowflake Command Line InterfaceSnowflake Connector for PythonSnowflake Connector for SparkGo Snowflake DriverSnowflake Connector for KafkaNode.js Driver.NET DriverJDBC DriverODBC DriverSnowCD (Connectivity Diagnostic Tool) Now, let us…

Continue ReadingDifferent Snowflake Connectors and Explanation
Comments Off on Different Snowflake Connectors and Explanation

Unique Features of Snowflake Data Warehouse

Snowflake is an analytical data warehouse solution in the cloud. It is faster, easy to use compared to other relational databases. In this article we will check few noteworthy, unique key features of Snowflake Data Warehouse compared to other relational databases in the same category. Unique Features of Snowflake Date Warehouse Snowflake cloud data warehouse comes with many unique features that are not present in any relational databases. Following are the some of the key features of the Snowflake cloud data warehouse. Unique Cloud ArchitectureDatabase and Object ClosingAllows you to query semi-structure JSON/XML dataWarehouse ConceptRecover table using…

Continue ReadingUnique Features of Snowflake Data Warehouse
2 Comments

How to Find Snowflake Table Size? – Query and Examples

Snowflake is a fully managed cloud data warehouse solution. It is fast, reliable and comes with near zero management. Similar to many relational databases, Snowflake support many system tables and views. System tables can store the important information such as records count, constraint details, etc. In this article, we will check how to find the Snowflake table size using system tables present in the information schema. How to Find Snowflake Table Size? As mentioned earlier, Snowflake maintains the important information in system tables. One of such view is TABLE_STORAGE_METRICS view.…

Continue ReadingHow to Find Snowflake Table Size? – Query and Examples
Comments Off on How to Find Snowflake Table Size? – Query and Examples