Different Approaches for Inserting Data Using Dynamic Partitioning into a Partitioned Hive Table
We will see different ways for inserting data using Dynamic partitioning into a Partitioned Hive table. To know how to create partitioned tables in Hive, go through the following links:- Creating Partitioned Hive table and importing data Creating Hive Table Partitioned by Multiple Columns and Importing Data Dynamic Partitioning Dynamic…
Different Approaches for Inserting Data Using Static Partitioning into a Partitioned Hive Table
We will see different ways for inserting data using static partitioning into a Partitioned Hive table. To know how to create partitioned tables in Hive, go through the following links:- Creating Partitioned Hive table and importing data Creating Hive Table Partitioned by Multiple Columns and Importing Data Static Partitioning Static…
Different Approaches for Inserting Data into a Hive Table
We will see different ways for inserting data into a Hive table. We have a table Employee in Hive with the following schema:- 0: jdbc:hive2://localhost:10000> desc employee; +———–+————+———-+–+ | col_name | data_type | comment | +———–+————+———-+–+ | id | bigint | | | name | string | | | age …
Hive Queries- Sort by, Order by, Cluster by, and Distribute By
In Hive queries, we can use Sort by, Order by, Cluster by, and Distribute by to manage the ordering and distribution of the output of a SELECT query. We will see this with an example. We have a table Employee in Hive, partitioned by Department. 0: jdbc:hive2://localhost:10000> desc employee; +————————–+———————–+———————–+–+…
Configure Hive Metastore on MySQL
We will see how to configure Hive metastore on MySQL. Create User and Database for Hive Metastore Create User :- mysql> CREATE USER ‘hiveuser’@’localhost’ IDENTIFIED BY ‘password’; Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON *.* TO ‘hiveuser’@’localhost’ WITH GRANT OPTION; Query OK, 0 rows affected…
Setup Hive 1.x
We will see how to setup Hive 1.x. Download Hive We will download hive-1.2.1, from – https://hive.apache.org/downloads.html Hive distribution file to download – apache-hive-1.2.1-bin.tar.gz Extract the contents of the file to a directory /home/hadoopUser/hive. tar -xvf apache-hive-1.2.1-bin.tar.gz Set Environment Variables For Hive to work, we need to set $HADOOP_HOME or…
Start Hiveserver2, Connect Through Beeline and Run Hive Queries
Hiveserver2 HiveServer2 is an enhanced Hive server designed for multi-client concurrency and improved authentication. It also provides better support for clients connecting through JDBC and ODBC. Start Hiverserver2 We have our hive installation under the directory – /home/hadoop/hive. Go to the ‘bin‘ directory under hive installation directory. To start the…
Creating Hive Table Partitioned by Multiple Columns and Importing Data
We will see how to create a Hive table partitioned by multiple columns and how to import data into the table. Partitioning We can use partitioning feature of Hive to divide a table into different partitions. Each partition of a table is associated with a particular value(s) of partition column(s).…
Creating External Hive table and importing data
We will see how to create an external table in Hive and how to import data into the table. External Table External tables in Hive do not store data for the table in the hive warehouse directory. External table in Hive stores only the metadata about the table in the…
Creating Partitioned Hive table and importing data
We will see how to create a partitioned table in Hive and how to import data into the table. Partitioning We can use partitioning feature of Hive to divide a table into different partitions. Each partition of a table is associated with a particular value(s) of partition column(s). Partitioning allows…