AsterExecute (Teradata Database) - Teradata Warehouse Miner

Teradata® Warehouse Miner™ User Guide - Volume 2ADS Generation

Product
Teradata Warehouse Miner
Release Number
5.4.6
Published
November 2018
Language
English (United States)
Last Update
2018-12-07
dita:mapPath
gxn1538171534877.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2301
Product Category
Software

This table operator is only available if the QueryGridTM Teradata-to-Aster feature is installed and enabled on a Teradata 15.00 or later system.

The AsterExecute table operator has two arguments, REMOTEQUERY (required) and SUBSTITUTE (optional). Two examples are given on the Examples tab of the AsterExecute properties dialog, one with the SUBSTITUTE argument and one without. The SUBSTITUTE argument can be used to substitute one type of quote for another.

EXAMPLE 1
SELECT * FROM ASTEREXECUTE
   (
      ON (SELECT * FROM tab1) @astersrv1 USING
      REMOTEQUERY('select * from sessionize (on %s partition by(''c1'')
      order by (''c1'') timecolumn (''c1'') timeout (''3000'') )')
   ) AS tv_spots;
EXAMPLE 2
SELECT * FROM ASTEREXECUTE
   (
      ON (SELECT * FROM tab1) @astersrv1 USING
      REMOTEQUERY('select * from sessionize (on %s partition by("c1")
      order by ("c1") timecolumn ("c1") timeout ("3000") )')
      SUBSTITUTE(' " -> '' ')
   ) AS tv_spots;

Notice that the examples include more than just arguments. They also include the selection of variables at the outermost level and the specification of one or more ON clauses. ON clauses are specified using separate ON clause elements, and the selection of variables is done by switching to the Variables tab, setting the Input Source to Function Table, and selecting the Function Table in question, which should display columns that may be selected.

The Arguments tab includes basic syntax elements that the user must edit to provide the server name (beginning with a ‘@’ sign) and the remote query SQL.