[ 
https://issues.apache.org/jira/browse/NIFI-4071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16889078#comment-16889078
 ] 

Matt Burgess commented on NIFI-4071:
------------------------------------

As a follow-up, for Hive 3 the preferred approaches are PutHive3Streaming for 
managed tables and PutORC/PutHDFS -> ReplaceText (with Hive DDL) -> PutHiveQL 
for external tables. Both of these are more efficient and less error-prone than 
trying to convert individual rows into HiveQL and then perform an INSERT.

> ConvertJSONToSQL does not support Hive
> --------------------------------------
>
>                 Key: NIFI-4071
>                 URL: https://issues.apache.org/jira/browse/NIFI-4071
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Matt Burgess
>            Priority: Major
>
> Currently, the ConvertJSONToSQL processor does not support Hive as the target 
> database, either using a HiveConnectionPool or a DBCPConnectionPool 
> configured with a Hive driver. At the very least:
> 1) A SQLException occurs when determining the auto-increment value. This is 
> due to a Hive bug (HIVE-13528 
> [https://issues.apache.org/jira/browse/HIVE-13528]) where the column is not 
> named according to the spec 
> ([http://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getColumns-java.lang.String-java.lang.String-java.lang.String-java.lang.String-]).
> 2) Column names are returned with the table name prepended (using a dot 
> separator)
> 3) There may be other JDBC API calls that are not supported by the Hive JDBC 
> driver.
> #1 could be solved by checking for "IS_AUTOINCREMENT" then failing over to 
> "IS_AUTO_INCREMENT".  #2 could be solved with a lastIndexOf("."), as is done 
> in _org.apache.nifi.util.hive.HiveJdbcCommon#createSchema(java.sql.ResultSet, 
> java.lang.String)_. #3 would take some investigation into the other JDBC API 
> calls being made.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to