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

QueryGridâ„¢ Installation and User Guide - 3.06

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata QueryGrid
Release Number
3.06
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-07
dita:mapPath
ndp1726122159943.ditamap
dita:ditavalPath
ft:empty
dita:id
lxg1591800469257
Product Category
Analytical Ecosystem
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 EXTERNAL 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)