Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
JaneYu
Contributor III
Contributor III

how to load a csv file into hive temp table

I need to load csv file into hive tables so I can write complicated logic in the hive query instead of expressions in the Talend.

Do I have to follow these steps? I did not test it yet.

1.tHiveCreateTable can be used to create a temp table

2.tFileInputDelimited (csv file)-> tHDFSOutput --store the csv in the HDFS system

3. then tHiveLoad --load the hdfs file to the hive table

4. use tHiveInput and get the data from the temp table

5. at the end of talend job, use tHiveRow to drop the temp table

 

Thank you.

Jane

Labels (4)
2 Replies
Jesperrekuh
Creator III
Creator III

If its not heavy duty production processes, suggest using WebHDFS REST api to upload data.
No packages, no jars, just need cUrl or tRestClient.

Hadoop WebHDFS

JaneYu
Contributor III
Contributor III
Author

After loading the csv to the temp hive table, it needs to join the other hive tables. 

So I prefer to complete everything in Talend. Thank you