2.06 - SHOW Syntax for the Hive Initiator Connector - Teradata QueryGrid

Teradata® QueryGrid™ Installation and User Guide

Product
Teradata QueryGrid
Release Number
2.06
Published
September 2018
Language
English (United States)
Last Update
2018-11-26
dita:mapPath
blo1527621308305.ditamap
dita:ditavalPath
ft:empty

The following SHOW statements are available when Hive is the initiating connector:

  • SHOW CREATE TABLE <table>; Display the complete CREATE TABLE statement of the specified table.
  • SHOW COLUMNS FROM|IN <table>; Describes the column information for the specified remote table.

The Hive SHOW statement is equivalent to the HELP FOREIGN statement that is used when Teradata is the initiator. See Examples of Using HELP FOREIGN.

Example: Using Hive-to-Teradata SHOW CREATE TABLE

The example fetches the details of the CREATE TABLE statement for the specified table from the remote Teradata system. Hive is the initiator connector.

jdbc:hive2://localhost:10000> SHOW CREATE TABLE cardata_remote;

Result:

+----------------------------------------------------------+--+
|                      createtab_stmt                      |
+----------------------------------------------------------+--+
| CREATE TABLE `cardata_remote`(                           |
|   `price` double COMMENT 'from deserializer',            |
|   `mileage` bigint COMMENT 'from deserializer',          |
|   `make` varchar(2048) COMMENT 'from deserializer',      |
|   `model` varchar(2048) COMMENT 'from deserializer',     |
|   `trim1` varchar(2048) COMMENT 'from deserializer',     |
|   `type1` varchar(2048) COMMENT 'from deserializer',     |
|   `cylinder` int COMMENT 'from deserializer',            |
|   `liter` double COMMENT 'from deserializer',            |
|   `doors` int COMMENT 'from deserializer',               |
|   `cruise` tinyint COMMENT 'from deserializer',          |
|   `sound` tinyint COMMENT 'from deserializer',           |
|   `leather` tinyint COMMENT 'from deserializer',         |
|   `dt` varchar(2048) COMMENT 'from deserializer',        |
|   `country` varchar(2048) COMMENT 'from deserializer')   |
| ROW FORMAT SERDE                                         |
|   'com.teradata.querygrid.qgc.hive.QGNGSerDe'            |
| STORED BY                                                |
|   'com.teradata.querygrid.qgc.hive.QGNGStorageHandler'   |
| WITH SERDEPROPERTIES (                                   |
|   'serialization.format'='1')                            |
| LOCATION                                                 |
|   'hdfs://TDINT/apps/hive/warehouse/cardata_remote'      |
| TBLPROPERTIES (                                          |
|   'database'='ut1',                                      |
|   'link'='hive_to_td_link',                              |
|   'version'='active',                                    |
|   'table'='cardata',                                     |
|   'transient_lastDdlTime'='1469578619')                  |
+----------------------------------------------------------+--+
29 rows selected (0.683 seconds)