Hadoop – Export Hive Data with Quoted Values into Flat File and Example

In general, quoted values are values which are enclosed in single or double quotation marks. Usually, quoted values files are system generated where each and every fields in flat files is either enclosed in SINGLE or DOUBLE quotation mark. In this article, we will check how to export Hadoop Hive data with quoted values into flat file such as CSV file format. Quoted Value File Overview In the quoted values files, values are enclosed in quotation mark in case there is a embedded delimiter. For example, comma separated values file…

Continue ReadingHadoop – Export Hive Data with Quoted Values into Flat File and Example
Comments Off on Hadoop – Export Hive Data with Quoted Values into Flat File and Example

Hive Create External Tables and Examples

A Hive external table allows you to access external HDFS file as a regular managed tables. You can join the external table with other external table or managed table in the Hive to get required information or perform the complex transformations involving various tables. In this article, we will check on Hive create external tables with an examples. You have to create external table same as if you are creating managed tables. LOCATION is mandatory for creating external tables. LOCATION indicates the location of the HDFS flat file that you want…

Continue ReadingHive Create External Tables and Examples
Comments Off on Hive Create External Tables and Examples

Hadoop Hive Create, Drop, Alter, Use Database Commands and Examples

Hadoop Hive is database framework on the top of Hadoop distributed file systems (HDFS) developed by Facebook to analyze structured data. It supports almost all commands that regular database supports. Hadoop hive create, drop, alter, use database commands are database DDL commands. This article explains these commands with an examples. Hive contains a default database named default. Read: Hive Create External Tables and Examples Hadoop Hive SHOW DATABASES commds This command displays all the databases available in Hive. Below is the example of using show database command: hive> show databases;…

Continue ReadingHadoop Hive Create, Drop, Alter, Use Database Commands and Examples
Comments Off on Hadoop Hive Create, Drop, Alter, Use Database Commands and Examples

Hive Create Table Command and Examples

The syntax of creating a Hive table is quite similar to creating a table using SQL. In this article explains Hive create table command and examples to create table in Hive command line interface. You will also learn on how to load data into created Hive table. Hive Create Table Command Hive Create Table statement is used to create table. You can also create the table hive while importing data using Sqoop command. To use, Sqoop create Hive table command, you should specify the --create-hive-table option in Sqoop command. You…

Continue ReadingHive Create Table Command and Examples
Comments Off on Hive Create Table Command and Examples

Hadoop Hive Bucket Concept and Bucketing Examples

Hadoop Hive bucket concept is dividing Hive partition into number of equal clusters or buckets. The bucketing concept is very much similar to Netezza Organize on clause for table clustering. Hive bucket is decomposing the hive partitioned data into more manageable parts. Let us check out the example of Hive bucket usage. Let us say we have sales table with sales_date, product_id, product_dtl etc. The Hive table will be partitioned on sales_date and product_id as the second-level partition would have led to too many small partitions in HDFS. To tackle this…

Continue ReadingHadoop Hive Bucket Concept and Bucketing Examples
Comments Off on Hadoop Hive Bucket Concept and Bucketing Examples

Load HBase Table from Apache Hive – Examples

In my other post “Sqoop import Relational Database Table into HBase Table” you learned on how to import data from relational database systems such as Netezza. And we have also seen how to export the HBase table data to relational database using Hive framework. In this article, we will check how to load HBase table from Apache Hive with an example. Why you want Load HBase Table from Apache Hive? This is obvious question, why you want to load HBase table from apache Hive? You may offload part of the…

Continue ReadingLoad HBase Table from Apache Hive – Examples
Comments Off on Load HBase Table from Apache Hive – Examples

Apache Hive Load Quoted Values CSV File and Examples

If you are reading this post, then you probably are considering using BigData or started BigData ecosystem for your huge data processing. When you say huge data, that means you may get all different kind of structured, unstructured and semi-structured data. Hive is just like your regular data warehouse appliances and you may receive files with single or double quoted values. In this article, we will see Apache Hive load quoted values CSV files and see some examples for the same. Apache Hive Load Quoted Values CSV File Let us…

Continue ReadingApache Hive Load Quoted Values CSV File and Examples
2 Comments

Apache Hive Different File Formats:TextFile, SequenceFile, RCFile, AVRO, ORC,Parquet

Apache Hive supports several familiar file formats used in Apache Hadoop. Hive can load and query different data file created by other Hadoop components such as Pig or MapReduce. In this article, we will check Apache Hive different file formats such as TextFile, SequenceFile, RCFile, AVRO, ORC and Parquet formats. Cloudera Impala also supports these file formats. Hive Different File Formats Different file formats and compression codecs work better for different data sets in Apache Hive. Following are the Apache Hive different file formats: Text File Sequence File RC File…

Continue ReadingApache Hive Different File Formats:TextFile, SequenceFile, RCFile, AVRO, ORC,Parquet
Comments Off on Apache Hive Different File Formats:TextFile, SequenceFile, RCFile, AVRO, ORC,Parquet

Hadoop Hive WITH Clause Syntax and Examples

With the Help of Hive WITH clause you can reuse piece of query result in same query construct. You can also improve the Hadoop Hive query using WITH clause. You can simplify the query by moving complex, complicated repetitive code to the WITH clause and refer the logical table created in your SELECT statements. Hadoop Hive WITH Clause A Hive WITH Clause can be added before a SELECT statement of you query, to define aliases for complex and complicated expressions that are referenced multiple times within the body of the…

Continue ReadingHadoop Hive WITH Clause Syntax and Examples
1 Comment

Hadoop Hive Conditional Functions: IF,CASE,COALESCE,NVL,DECODE

Hadoop Hive supports the various Conditional functions such as IF, CASE, COALESCE, NVL, DECODE etc. You can use these function for testing equality, comparison operators and check if value is null. Following diagram shows various Hive Conditional Functions: Hive Conditional Functions Below table describes the various Hive conditional functions: Conditional Function Description IF(boolean testCondition, T valueTrue, T valueFalseOrNull); This is the one of best Hive Conditional Functions and is similar to the IF statements in other programming languages. The IF Hive Conditional functions tests an expression and returns a corresponding…

Continue ReadingHadoop Hive Conditional Functions: IF,CASE,COALESCE,NVL,DECODE
3 Comments