Hive on Error Stop Script Execution – Options

When you build a data warehouse on top of Hadoop HDFS using Hive framework, you may have to execute HiveQL or SQL queries or HiveQL script containing a bunch of HiveQL statements. Hive and Beeline does provide option to execute a script file. There may be a scenario in which you may want to stop the script execution in case if any of the SQL statement fails. In this article, we will check stop script execution on error in Hive. We shall see both Hive and Beeline CLI options to exit script execution in case…

Continue ReadingHive on Error Stop Script Execution – Options
Comments Off on Hive on Error Stop Script Execution – Options

Hadoop Hive isnumeric Alternative and Examples

In a data warehouse environment, you will be working with heterogeneous data set. You may have to filter out unwanted data before loading it to the actual data into Hive table. For example, you many have a field1 of type string contains alphanumeric values. In many scenarios, you may get requirement to filter out non-numeric values. In this article, we will check Hadoop Hive isnumeric Alternative with some examples. Hadoop Hive isnumeric Function Many relational databases provide an extended SQL functions to help the data warehouse developers. Databases such as…

Continue ReadingHadoop Hive isnumeric Alternative and Examples
Comments Off on Hadoop Hive isnumeric Alternative and Examples

Hadoop Hive Transactional Table Update join and Example

As you know Apache Hive is a data warehouse framework on top of Hadoop HDFS. Since it contains tables, you may want to update records of that table based on how your data changes. Until recently Apache Hive was not supporting transactions. Starting Hive 0.14 and above supports transactional table. You need to enable ACID properties in order to use update, delete, merge in your Hive queries. In this article, we will address How to use update join on your Hive transactional table. You can also update Hive table without…

Continue ReadingHadoop Hive Transactional Table Update join and Example
Comments Off on Hadoop Hive Transactional Table Update join and Example

Apache Hive – Extract Value from JSON using Hive – Example

A JSON file is a file that stores simple data structures and objects in JavaScript Object Notation (JSON) format, which is a standard data interchange format. Json files are mainly used to transfer data in web applications. Many web applications use the json files for data transfer between application and servers. In this article, we will check how to extract or get value from json file using Hive queries. Extract Value from JSON using Hive Apache Hive provides limited support to JSON files. You can store json data into Hive…

Continue ReadingApache Hive – Extract Value from JSON using Hive – Example
Comments Off on Apache Hive – Extract Value from JSON using Hive – Example

Hive Array Functions, Usage and Examples

It is very common to store values in the form of an array in the databases. Later you can use array manipulation functions to manipulate the array types. In this article, we will check how to work with Hive array functions to manipulate array types. Hive Array Functions Below are some of the commonly used Hive array functions. Hive Array Function The very first most used function is array function. This function is used to create array out of integer or string values. Following is the syntax of array function.…

Continue ReadingHive Array Functions, Usage and Examples
Comments Off on Hive Array Functions, Usage and Examples

Apache Hive DUAL Table Support and Alternative

Apache Hive like many other relational databases does not support dual table. You can simply use the SELECT without FROM clause to display the results of the function or expression that you are testing. But, it may cause a problem when you are migrating from Oracle to Hive. You may find a lot of queries using dual tables. In this article, we will check what is the dual table alternative in Hive and how to use it. What is DUAL table in Relational Databases? In relation databases, the DUAL is…

Continue ReadingApache Hive DUAL Table Support and Alternative
Comments Off on Apache Hive DUAL Table Support and Alternative

Hive Incremental Load Options and Examples

The incremental load is very common in a data warehouse environment. Incremental load is commonly used to implement slowly changing dimensions. When you migrate your data to the Hadoop Hive, you might usually keep the slowly changing tables to sync up tables with the latest data. In this article, we will check Hadoop Hive incremental load options and some examples. Hive Incremental Load Options There are many methods you can use. Apache Hive introduced to ACID supports since Hive 0.14. Following are the couple of methods that you can use…

Continue ReadingHive Incremental Load Options and Examples
Comments Off on Hive Incremental Load Options and Examples

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

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…

Continue ReadingRedshift generate_series Function, Usage and Example
Comments Off on Redshift generate_series Function, Usage and Example