Skip to main content

Creating a partitioned Hive table

This scenario illustrates how to use tHiveConnection, tHiveCreateTable and tHiveLoad to create a partitioned Hive table and write data in it.

For more technologies supported by Talend, see Talend components.

Note that tHiveCreateTable and tHiveLoad are available only when you are using one of the Talend solutions with Big Data.

The sample data to be used in this scenario is employee information of a company, reading as follows:
1;Lyndon;Fillmore;21-05-2008;US
2;Ronald;McKinley;15-08-2008
3;Ulysses;Roosevelt;05-10-2008
4;Harry;Harrison;23-11-2007
5;Lyndon;Garfield;19-07-2007
6;James;Quincy;15-07-2008
7;Chester;Jackson;26-02-2008
8;Dwight;McKinley;16-07-2008
9;Jimmy;Johnson;23-12-2007
10;Herbert;Fillmore;03-04-2008
				

The information contains some employees' names and the dates when they are registered in a HR system. Since these employees work for the US subsidiary of the company, you will create a US partition for this sample data.

Before starting to replicate this scenario, ensure that you have appropriate rights and permissions to access the Hive database to be used.

Note that if you are using the Windows operating system, you have to create a tmp folder at the root of the disk where Talend Studio is installed.

Then proceed as follows:

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!