HELP FOREIGN 使用示例 - Teradata QueryGrid

Teradata® QueryGrid™ 安装和用户指南

Product
Teradata QueryGrid
Release Number
2.19
Published
2022 年 7 月
Language
中文 (简体)
Last Update
2022-08-23
dita:mapPath
zh-CN/jpf1654813554544.ditamap
dita:ditavalPath
ft:empty
dita:id
lxg1591800469257
Product Category
Analytical Ecosystem

示例:Teradata 到 Presto HELP FOREIGN SERVER

该示例从与该服务器关联的目录提取模式(数据库)。

help foreign server QG_Presto1;

结果︰

Databases 
--------------------
default 
information_schema
finance
marketing

示例:Teradata 到 Presto HELP FOREIGN DATABASE

该示例从指定数据库提取表。

help foreign database "default"@QG_Presto1;

结果︰

Tables
---------------------
buses 
ca120453 
jing_part_tab1 
prama_part_tab1 
tbig_1row 
web_sales_part1_orc

示例:Teradata 到 Presto HELP FOREIGN TABLE

该示例提取指定表的列信息。

可以在指定或不指定数据库或模式名称的情况下运行 HELP FOREIGN TABLE。当查询中未提供数据库名称时,将使用当前登录的数据库或连接器缺省值。
help foreign table tbig_1row@QG_Presto1;

结果︰

Column    | Type    | Comment
————-——-----+—————-----+————-
id        | bigint  | 
firstname | varchar | 
lastname  | varchar | 
gender    | varchar | 
age       | bigint  |

示例:Teradata 到 Teradata HELP FOREIGN FUNCTION

该示例提取有关指定的外部函数的信息。

help foreign function syslib.MonitorQueryBand@td1 ;

结果︰

            Parameter Name HostId
                     Type I2
                  Comment ?
                 Nullable Y
                   Format -(5)9
               Max Length             2
     Decimal Total Digits    ?
Decimal Fractional Digits    ?
              Table/View? F
                Char Type  ?
           Parameter Type I
                 UDT Name ?
Parameter Dictionary Name HostId
       Parameter SQL Name HostId
   Parameter Name UEscape ?
      UDT Dictionary Name ?
             UDT SQL Name ?
         UDT Name UEscape ?
            Inline Length             ?
           Parameter Name SessionNo
                     Type I
                  Comment ?
                 Nullable Y
                   Format -(10)9
               Max Length             4
     Decimal Total Digits    ?
Decimal Fractional Digits    ?
              Table/View? F
                Char Type  ?
           Parameter Type I
                 UDT Name ?
Parameter Dictionary Name SessionNo
       Parameter SQL Name SessionNo
   Parameter Name UEscape ?
      UDT Dictionary Name ?
             UDT SQL Name ?
         UDT Name UEscape ?
            Inline Length             ?
           Parameter Name RunVProcNo
                     Type I2
                  Comment ?
                 Nullable Y
                   Format -(5)9
               Max Length             2
     Decimal Total Digits    ?
Decimal Fractional Digits    ?
              Table/View? F
                Char Type  ?
           Parameter Type I
                 UDT Name ?
Parameter Dictionary Name RunVProcNo
       Parameter SQL Name RunVProcNo
   Parameter Name UEscape ?
      UDT Dictionary Name ?
             UDT SQL Name ?
         UDT Name UEscape ?
            Inline Length             ?
           Parameter Name RETURN0
                     Type CV
                  Comment ?
                 Nullable Y
                   Format X(12304)
               Max Length        24,608
     Decimal Total Digits    ?
Decimal Fractional Digits    ?
              Table/View? F
                Char Type  2
           Parameter Type O
                 UDT Name ?
Parameter Dictionary Name RETURN0
       Parameter SQL Name RETURN0
   Parameter Name UEscape ?
      UDT Dictionary Name ?
             UDT SQL Name ?
         UDT Name UEscape ?
            Inline Length             ?