简体   繁体   中英

Create impala table and add data using java

I am trying to create an impala table and add data into it using java.

1.) How should I create connection for impala?

2.) Can I create an impala table directly or should I create a hive table and access it using impala?

A java program or code snippets will help.

You could use the impala jdbc driver.

Refer the following link , this has a sample code for the impala connection using the jdbc driver.

For creating a table in impala you could pass it as a query, neednot do it in hive. In case you add/create a table in hive then you need to invalidate metadata in impala so as to reflect the table details in impala.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM