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:
(12 rows)
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 |