How to use Redshift Unique Key Constraint? Its Syntax

In my other Redshift related article, we have discussed how to define a primary key, foreign key and NOT NULL constraint. In this article, we will check how to use Redshift UNIQUE KEY constraint with its syntax. Redshift Unique Key Constraint Amazon AWS Redshift is an analytical columnar database. Many transactional database features are not supported on Redshift. You can define a unique key, but Unique key is informational only; They are not enforced by Amazon Redshift. The Amazon data warehouse appliance supports referential integrity constraints such as Redshift primary…

Comments Off on How to use Redshift Unique Key Constraint? Its Syntax

How to use Redshift Primary key Constraint? Its Syntax

Amazon Redshift is one of the earliest cloud data warehouses. It is based on the PostgreSQL. There are many features that are common in Redshift and PostgreSQL. Amazon Redshift provides many features to the user who wants to migrate to AWS Redshift. One of such features is primary key constraints. Basically, Redshift supports the referential integrity constraint such as primary key, foreign key, not null and unique key. You can create a primary key during table creation, that is, table DDL or you can use alter table command to add…

Comments Off on How to use Redshift Primary key Constraint? Its Syntax

Redshift WHERE Clause Multiple Columns Support

The relational databases such as Teradata and Oracle supports the multiple columns in WHERE clause. It is one of the main requirements when you are migrating from legacy databases such as Teradata to Amazon Redshift. In this article, we will check Redshift WHERE clause multiple columns support. What is a WHERE Clause? The WHERE clause contains conditions that either apply predicates to columns in tables or join multiple tables. Almost all modern databases allow you to join tables in WHERE clause. The WHERE clause specifies a condition that matches a subset of…

Comments Off on Redshift WHERE Clause Multiple Columns Support

Set Operators in Redshift: UNION, EXCEPT/MINUS and INTERSECT

Like many other cloud data warehouses, Amazon Redshift supports set operators such as UNION, EXCEPT/MINUS and INTERSECT to combine two or more similar data sets from two or more SELECT statements. Here the similar data set literally mean, the data type of the result set should also match, otherwise you have to explicitly type cast data when using Redshift set operators. Set Operators in Redshift Types of Set Operators in Redshift Amazon Redshift supports the following types of set operators: UNION [DISTINCT] and UNION ALLINTERSECT [DISTINCT]EXCEPT [DISTINCT] or MINUS [DISTINCT]…

Comments Off on Set Operators in Redshift: UNION, EXCEPT/MINUS and INTERSECT

Working with Redshift Regular Expression Functions

The regular expression functions in Amazon Redshift offer many advantages such as identifying precise patterns of characters in the given string. You can use these functions to validate the input data. For e.g. validate if the input value is an integer. The regular expression can also help you to extract specific string or characters from input. Redshift Regular Expression Functions In the previous post, we have discussed Redshift NVL and NVL2 functions to deal with NULL values. In this article, we will check how to use Redshift RegEx functions in…

Comments Off on Working with Redshift Regular Expression Functions

Redshift NVL and NVL2 Functions – Syntax and Examples

In my other post, we have discussed how to handle NULL values in Redshift using NULL handling functions. In this article, we will check couple of NULL handling functions such as Redshift NVL and NVL2 functions in details with syntax, usage and few examples. Redshift NVL and NVL2 Functions Redshift NVL and NVL2 Functions Similar to many other relational database or data warehouse appliances, Redshift supports NVL and NVL2. These functions are mainly used to handle the null values in Redshift tables. For example, replace NULL values with any readable…

Comments Off on Redshift NVL and NVL2 Functions – Syntax and Examples

How to Handle NULL in Redshift? – Functions

A NULL value in a relational database is a special marker in SQL that indicates a data value does not exist in the database table. In other words, it is just a placeholder to denote values that are missing or that we do not know. Almost all relational databases and bigdata frameworks support functions to handle null values. In this article, we will check how to handle NULL in Amazon AWS Redshift, we shall also check Redshift NULL handling functions, usage and some examples. Handle NULL in Redshift Handle NULL in Amazon Redshift Similar…

Comments Off on How to Handle NULL in Redshift? – Functions

Working with External Tables in Amazon Redshift

Until recently Amazon Redshift was not supporting external tables. But, you can create external tables in Amazon Redshift using Redshift Spectrum. External tables allow you to access S3 flat files as a regular Redshift table. You can join the Redshift external table with a database tables such as permanent or temporary table to get required information. You can also perform a complex transformation involving various tables including external tables. The External tables are usually used to build the data lake where you access the raw data file which is stored…

Comments Off on Working with External Tables in Amazon Redshift

How to Handle NULL in Snowflake? Functions

Snowflake is one of the leading cloud databases that you can use to create cloud data warehouse. It is built for a cloud and supports almost all features that are available in the current on-premises or cloud databases. In my other article, we have seen why you should learn Snowflake database. In this article, we will check how to handle NULL values in a Snowflake cloud database. We will also check null handling functions available in Snowflake. How to Handle NULL in Snowflake? A NULL value in any relational database is a…

Comments Off on How to Handle NULL in Snowflake? Functions

Why You Should Learn Snowflake? Complete Features

Snowflake is an analytic data warehouse on cloud provided as Software-as-a-Service (SaaS). The Snowflake database support ANSI SQL with added functionalities. It is faster and easier to use cloud data warehouse compared other cloud databases such as Redshift, Azure Synapse or GCP BigQuery. In this article, we will explain why you should learn Snowflake cloud database. We will also check the features that makes Snowflake a unique cloud database for data warehouse design. Why You Should Learn Snowflake? Snowflake is a cloud database specifically designed for a cloud. As per…

Comments Off on Why You Should Learn Snowflake? Complete Features