Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to load data of snappy file into hive table?

How to load data of snappy file into hive table?

New Contributor

Hi Guys,

I have a snappy file created in hdfs though the following nifi flow:QueryDatabaseTable(Mysql)->PutHDFS(Snappy compression)

I tried to load this snappy file into my hive table but I was unable to do so.This snappy file contains data of mysql table into compressed format.

Can any of you suggest a suitable hive query to load data of snappy file into hive table?

1 REPLY 1
Highlighted

Re: How to load data of snappy file into hive table?

@Parth Karkhanis

Your PutHDFS file should add an attribute to the flow file called ${hive.ddl}. You should be able to use this DDL statement to create the hive table. Work with it manually until you get the syntax correct.

In my working example, I send PutHdfs to ReplaceText where I append ${hive.ddl} with

${hive.ddl} LOCATION '/user/nifi/${folderName}/${tableName}/' tblproperties ("orc.compress" = "SNAPPY")

Then I send that to PutHiveQL Processor.

If this answer helps, please choose ACCEPT.

 


 


If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  


 


Thanks,



Steven

Don't have an account?
Coming from Hortonworks? Activate your account here