1 Reply Latest reply on Feb 17, 2017 2:19 PM by Gardella Juan

    Hive result is not showed properly

    Gardella Juan

      Hi,

       

      I'm testing SQLDeveloper with Hive. It works generally but I found some queries are not properly parsed. For example:

       

      Query: DESCRIBE FORMATTED <tablename>;

      Error: oracle.dbtools.db.ResultSetFormatter.formatResults(ResultSetFormatter.java:87)

      SQL Developer version: Versión 4.1.3.20

      Cloudera JDBC Driver for Apache Hive 2.5.18

       

      Is there any way to export the result as plain text without trying to parse the result?

       

      P.S.: To support Hive in SQLDeveloper I followed https://community.hortonworks.com/articles/1887/connect-oracle-sql-developer-to-hive.html

        • 1. Re: Hive result is not showed properly
          Gardella Juan

          The result of the query that cannot be parsed is:

          0: jdbc:hive2://> DESCRIBE FORMATTED raw_sequence_avro; OK 17/02/12 13:38:14 [main]: WARN lazy.LazyStruct: Extra bytes detected at the end of the row! Ignoring similar problems. +-------------------------------+------------------------------------------------------------------------+-----------------------+--+ |           col_name            |                               data_type                                |        comment        | +-------------------------------+------------------------------------------------------------------------+-----------------------+--+ | # col_name                    | data_type                                                              | comment               | |                               | NULL                                                                   | NULL                  | | line                          | string                                                                 |                       | |                               | NULL                                                                   | NULL                  | | # Detailed Table Information  | NULL                                                                   | NULL                  | | Database:                     | default                                                                | NULL                  | | Owner:                        | anonymous                                                              | NULL                  | | CreateTime:                   | Sun Feb 12 02:47:57 UTC 2017                                           | NULL                  | | LastAccessTime:               | UNKNOWN                                                                | NULL                  | | Protect Mode:                 | None                                                                   | NULL                  | | Retention:                    | 0                                                                      | NULL                  | | Location:                     | hdfs://quickstart.cloudera:8020/user/hive/warehouse/raw_sequence_avro  | NULL                  | | Table Type:                   | MANAGED_TABLE                                                          | NULL                  | | Table Parameters:             | NULL                                                                   | NULL                  | |                               | COLUMN_STATS_ACCURATE                                                  | true                  | |                               | numFiles                                                               | 1                     | |                               | numRows                                                                | 1                     | |                               | rawDataSize                                                            | 0                     | |                               | totalSize                                                              | 211                   | |                               | transient_lastDdlTime                                                  | 1486906467            | |                               | NULL                                                                   | NULL                  | | # Storage Information         | NULL                                                                   | NULL                  | | SerDe Library:                | org.apache.hadoop.hive.serde2.avro.AvroSerDe                           | NULL                  | | InputFormat:                  | org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat             | NULL                  | | OutputFormat:                 | org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat            | NULL                  | | Compressed:                   | No                                                                     | NULL                  | | Num Buckets:                  | -1                                                                     | NULL                  | | Bucket Columns:               | []                                                                     | NULL                  | | Sort Columns:                 | []                                                                     | NULL                  | | Storage Desc Params:          | NULL                                                                   | NULL                  | |                               | serialization.format                                                   | 1                     | +-------------------------------+------------------------------------------------------------------------+-----------------------+--+ 31 rows selected (1.39 seconds) 0: jdbc:hive2://>