SQL-MapReduce Call - Aster Analytics

Teradata Aster Analytics Foundation User Guide

Product
Aster Analytics
Release Number
6.21
Published
November 2016
Language
English (United States)
Last Update
2018-04-14
dita:mapPath
kiu1466024880662.ditamap
dita:ditavalPath
AA-notempfilter_pdf_output.ditaval
dita:id
B700-1021
lifecycle
previous
Product Category
Software

The function calculates the correlation between each pair of columns in the TargetColumns argument. This example compares GDP to GDPdeflator, the employed population to GDP, the number of people unemployed, and the number of people in the armed forces.

SELECT * FROM Corr_Reduce (
  ON Corr_Map (
    ON corr_input PARTITION BY state
    TargetColumns('[2:3]', 'employed:gdp', 'employed:unemployed',
                   'employed:armedforces')
    KeyName ('key')
    GroupByColumns ('state')
  )
  PARTITION BY key,state
) ORDER BY 1, 3 DESC;