Example 2: Project from IMDC and Add node_ip and part_id - Aster Execution Engine

Teradata Aster® Developer Guide

Product
Aster Execution Engine
Release Number
7.00.02
Published
July 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
xnl1494366523182.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
ffu1489104705746
lifecycle
previous
Product Category
Software

SQL-MapReduce Call

This example is like Example 1: Project from IMDC, but it also outputs the IP addresses and partition indexes of the partitions that host the data.

SELECT * FROM project_from_imdc (
  ON nc_system.nc_dummy
  imdc ('data1')
  echo_node_ip ('true')
  echo_part_id ('true')
) ORDER BY a, b;

Projection from IMDC data1

The preceding query returns:
NodeIp PartIdx a b
10.80.168.121 3 0 0
10.80.168.121 3 0 1
10.80.168.122 2 1 0
10.80.168.122 2 1 1
10.80.168.123 1 2 0
10.80.168.123 1 2 1
10.80.168.121 0 3 0
10.80.168.121 0 3 1
10.80.168.122 5 4 0
10.80.168.122 5 4 1
10.80.168.123 4 5 0
10.80.168.123 4 5 1
(12 rows)