Identify and Remove Duplicate Records from Snowflake Table

Snowflake supports primary, foreign key(s) and unique key(s), but, does not enforce them. Snowflake table allows you to insert duplicate rows. There are chances that some application may insert the records multiple times. There are several methods you can use to de-duplicate the snowflake tables. In this article, we will check how to identify and remove duplicate records from Snowflake table. Remove Duplicate Records from Snowflake Table There are many methods that you can use to remove the duplicate records from the Snowflake table. For example, use the DISTINCT keyword…

Continue ReadingIdentify and Remove Duplicate Records from Snowflake Table
Comments Off on Identify and Remove Duplicate Records from Snowflake Table

Snowflake WITH Clause Syntax, Usage and Examples

Snowflake WITH Clause is an optional clause that always precedes SELECT clause in the query statements or construct. The WITH clause usually contains a sub query that is defined as a temporary table similar to View definition. Each sub query in the WITH clause is associated with the name, an optional list of a column names, and a query that evaluates to a table. The query expression is usually a select statement. In this article, we will check Snowflake WITH clause syntax, usage, types of WITH clause with some examples.…

Continue ReadingSnowflake WITH Clause Syntax, Usage and Examples
Comments Off on Snowflake WITH Clause Syntax, Usage and Examples

Snowflake Regular Expression Functions and Examples

The regular expressions are commonly used functions in programming languages such as Python, Java, R, etc. The Snowflake regular expression functions identify the precise pattern of the characters in given string. Regular expressions are commonly used in validating strings, for example, extracting numbers from the string values, etc. In this article, we will check the supported Regular expression functions in Snowflake. Snowflake Regular Expression Functions The regular expression functions are string functions that match a given regular expression. These functions are commonly called as a 'regex' functions. Below are some…

Continue ReadingSnowflake Regular Expression Functions and Examples
Comments Off on Snowflake Regular Expression Functions and Examples

Teradata Type Conversion Functions and Examples

Teradata is one of the common and widely used MPP database. Just like many relational databases, Teradata supports many useful functions. You can use these functions to covert the value of one data type to another. In this article, will check commonly used Teradata type conversion functions with some examples. The type conversion functions use common calling function i.e. the first argument is the value to be formatted or converted, and the second argument is a template that defines the output or input format. These conversion functions should be used…

Continue ReadingTeradata Type Conversion Functions and Examples
Comments Off on Teradata Type Conversion Functions and Examples

How to Check Integer Type Values in Teradata? Example

Data validation is one of the most important task in the data warehouse environment. Data validation includes, integer type check, count check, etc. For instance, check the row count after data migration. In my other article, we have discussed how to identify the decimal type values. In this article, we will see how to check integer type values in Teradata with some example. Integer type check can also be refereed as a integer data validation. Teradata Integer Type Values Check Just like many other relational databases, Teradata also provides many…

Continue ReadingHow to Check Integer Type Values in Teradata? Example
Comments Off on How to Check Integer Type Values in Teradata? Example

Teradata isnumeric Function Alternatives and Examples

Teradata is one of the widely used MPP databases. It can be used to combine many data sources. When you work with heterogeneous data set, you may have to get rid of many unwanted characters such as $ in your price column. If your application requirement is of numeric type, you may get requirement to filter out non-numeric values. In this article, we will check Teradata isnumeric function alternatives with some examples. We will also see how to check if string is numeric with an example. Teradata isnumeric Function The…

Continue ReadingTeradata isnumeric Function Alternatives and Examples
Comments Off on Teradata isnumeric Function Alternatives and Examples

How to Create Spark SQL User Defined Functions? Example

A user defined function (UDF) is a function written to perform specific tasks when built-in function is not available for the same. In a Hadoop environment, you can write user defined function using Java, Python, R, etc. In this article, we will check how to create Spark SQL user defined functions with an python user defined functionexample. Spark SQL User-defined Functions When you migrate your relational database warehouse to Hive and use Spark as an execution engine, you may miss some of the built-in function support. Some user defined functions…

Continue ReadingHow to Create Spark SQL User Defined Functions? Example
Comments Off on How to Create Spark SQL User Defined Functions? Example

Spark SQL isnumeric Function Alternative and Example

Most of the organizations are moving their data warehouse to the Hive and using Spark as an execution engine. Spark as an execution engine will boost the performance. In SQL, there are many options that you can use to deal with non-numeric values, for example, you can create user defined functions to filter out unwanted data. In this article, we will check Spark SQL isnumeric function alternative and examples. Spark SQL isnumeric Function Spark SQL, or Apache Hive does not provide support for is numeric function. You have to write…

Continue ReadingSpark SQL isnumeric Function Alternative and Example
Comments Off on Spark SQL isnumeric Function Alternative and Example

Redshift Split String on Delimiter and Examples

Be it relational database management system or any programming language, most common requirement is the split string and extract the particular value of the result. In this article, we will check Redshift split string on delimiter with some examples. Redshift Split String Many relational databases such as Netezza, PostgreSQL, etc, supports array functions. You can use those array functions to extract records from split string result. Unfortunately, Amazon Redshift does not support array functions. Redshift does support split_part string function, you can use this function to split string on any…

Continue ReadingRedshift Split String on Delimiter and Examples
Comments Off on Redshift Split String on Delimiter and Examples

How to Export Redshift Data to JSON Format?- Method and Example

The JSON format is one of the widely used file formats to store data that you want to transmit to another server. Many web applications use JSON to transmit the application information. The JSON file format is an alternative to XML. In this article, we will check how to export redshift data to json format with some examples. What is JSON file? The JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. The JSON file format stores the…

Continue ReadingHow to Export Redshift Data to JSON Format?- Method and Example
Comments Off on How to Export Redshift Data to JSON Format?- Method and Example