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…

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…

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…

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…

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…

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

Redshift generate_series Function, Usage and Example

A lot of charts, tables and dashboards that are developed using series values such as time series. Amazon Redshift prior to the PostgreSQL 8.4 was not supported generate series function. In this article, we will check how to use Redshift generate_series function, its usage and example. Page Content Introduction Redshift generate_series() Function Redshift generate_series Function Syntax Redshift generate_series Function Example Generate Series in Reverse Order Generate Date Series in Redshift Generate Series Function with INSERT Statement Conclusion Introduction Redshift generate_series function is a powerful tool that is widely used in…

Comments Off on Redshift generate_series Function, Usage and Example

Amazon Redshift Array Support and Alternatives – Example

It is common to store values in the form of array in the database. Many databases like Netezza, PostgreSQL supports array functions to manipulate the array types. However, Amazon Redshift does not support array types. In this article, we will check alternative method that you can use. Amazon Redshift Array Support As mentioned in the previous section, Amazon Redshift does not support array types or functions. Though, Redshift uses PostgreSQL, but they yet to provide support to arrays. You can check unsupported features in the official documentation. Best part is,…

Comments Off on Amazon Redshift Array Support and Alternatives – Example

Amazon Redshift Load CSV File using COPY and Example

Many organizations use flat files such as CSV or TSV files to offload tables, managing flat files is easy and can be transported by any electronic medium. In this article, we will check how to load or import CSV file into Amazon Redshift using COPY command with some examples. Page Content Introduction Preparing for Redshift Load CSV Load CSV File using Redshift COPY Command Redshift COPY command with Column Names Redshift COPY command to ignore First Line from CSV Redshift COPY Command with Custom Delimiter Best Practices for Loading CSV…

Comments Off on Amazon Redshift Load CSV File using COPY and Example

How to Change Redshift Table Sort Key and Example

Just like using a right distribution style, selecting right sort key is important to boost your Redshift database performance. How data is stored onto the disk blocks defines the performance of the queries that you are running against those tables. It is not that easy to change the sort key once defined. In this article, we will check how to change Redshift table sort key with an example. Page Content Introduction Understanding the Redshift Table Sort Key Why to Change Redshift Table Sort Key? How to Change Redshift Table Sort…

Comments Off on How to Change Redshift Table Sort Key and Example

How to Change Redshift Table Distribution Style and Example

Choosing right distribution style is one of the important factors to improve the performance of Redshift Database. Distribution style will directly affect the performance of your query. Table with wrong distribution style might hamper your Redshift cluster because of workload. In this article, we will check how to change Redshift table distribution style with an example. Why to Change Redshift Table Distribution style? There are three types of distribution style available in Redshift: EVEN distributionKEY distributionALL distribution You can choose any of the style based on your data, size and…

Comments Off on How to Change Redshift Table Distribution Style and Example