Specify a contiguous or sparse map and, optionally, colocation name for table operator execution. The table operator executes only on the AMPs in the map. The database distributes input rows to the AMPs in the specified or default map before running the table operator on the specified or default map if the input rows are not already distributed per that map.
You must have been granted the specified map.
When the EXECUTE MAP clause is not specified, the execute map will be as defined by the table operator. See the EXECUTE MAP option under CREATE FUNCTION and REPLACE FUNCTION (Table Form) in User-Defined Function Statements of Teradata Vantage™ SQL Data Definition Language Syntax and Examples, B035-1144.
- map_name
- Name of contiguous or sparse map.
- COLOCATE USING colocation_name
- Name for colocating the function on the same AMPs with other functions, tables, join indexes, or hash indexes.
Example: Specifying a Sparse Map for a Table Operator
Because this example specifies a sparse map, colocation_name defaults to db1_tableop1, which overrides the colocation name specified, if any, when the table operator was created.
SELECT * FROM db1.tableop1 ( ON ( SELECT * FROM tab1) PARTITION BY col1 ON ( SELECT * FROM tab2) PARTITION BY col2 EXECUTE MAP = OneAMPMap USING myvalue(10,20) ) AS d1;