Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to...

13
Contents Create Hive Loading Job................................................................................................................................ 2 Read & Extract CSV File on HDFS .................................................................................................................. 2 Create Hive Connection ................................................................................................................................ 3 Run Hive Server ............................................................................................................................................. 5 Create Hive Table .......................................................................................................................................... 6 Load Hive Table ............................................................................................................................................. 9 Read Product Table ..................................................................................................................................... 10 Close Hive Connection ................................................................................................................................ 12 Link every component as required ............................................................................................................. 12

Transcript of Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to...

Page 1: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Contents Create Hive Loading Job ................................................................................................................................ 2

Read & Extract CSV File on HDFS .................................................................................................................. 2

Create Hive Connection ................................................................................................................................ 3

Run Hive Server ............................................................................................................................................. 5

Create Hive Table .......................................................................................................................................... 6

Load Hive Table ............................................................................................................................................. 9

Read Product Table ..................................................................................................................................... 10

Close Hive Connection ................................................................................................................................ 12

Link every component as required ............................................................................................................. 12

Page 2: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Create Hive Loading Job

Create a job using Job Designs. Right Click on Job Designs and create the Job.

Click Finish.

Read & Extract CSV File on HDFS Create a product.csv file in local directory. Create HDFS job using tHDFSPut component from BigData

Palette. Fill all the details as below in Component Tab.

Page 3: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Create Hive Connection

Select Hive from BigData from Palette. Drag and drop tHiveConnection from Hive Palette in the newly

created job.

Page 4: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Select the tHiveConnection component and open the Component tab from the bottom panel. Fill all the

required details as below.

Page 5: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Run Hive Server

Start Hive Server in Linux OS. (Please make sure you have CDH3 installed in your local system).

Type the below command in shell prompt:

hive --service hiveserver

From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server.

Page 6: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Create Hive Table

Drag and drop tHiveCreateTable from BigData Palette. Select tHiveCreateTable component and fill the

component details as below.

Page 7: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Click on Edit schema.

Page 8: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Fill the schema details.

Page 9: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Ok.

Load Hive Table

Load product.csv file from local to Hive table “Product” in Talend Studio. Fill in the details as below in

Component Tab..

Page 10: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Read Product Table

Drag and drop tHiveRow from Hive Palette. Fill in the details as below in Component Tab.

Page 11: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Edit the schema.

Page 12: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.

Display the result in console Drag and drop tLogRow from Log & Errors. Fill the details as below in component tab.

Close Hive Connection

Drag and drop tHiveClose from Hive Palette. Fill in the details as below in Component Tab.

Link every component as required

Right Click on each component. Choose TriggerOn SubJob OK. Then link the connector to the required

component.

Run the job

Page 13: Contents · From Talend Open Studio, select Run Job from the bottom panel. You will be connected to Hive server. Create Hive Table Drag and drop tHiveCreateTable from BigData Palette.