SQL-MapReduce Calls - 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

There are two ways to use Interpolation with SeriesSplitter:

  • Call SeriesSplitter as in Example 1: Partition Splitter to create ibm_stock_split and then call Interpolator:
    SELECT * FROM Interpolator (
      ON  ibm_stock1_split  AS input_table
      PARTITION BY id ORDER BY "period"
      TimeColumn ('period')
      TimeInterval (86400)
      InterpolationType ('linear')
      ValueColumns ('stockprice')
      Accumulate ('id')
      DuplicateRowsCount (2)
    );
  • Combine the calls to SeriesSplitter and Interpolator:
    SELECT * FROM Interpolator (
      ON (SELECT * FROM SeriesSplitter (
        ON (SELECT 1) PARTITION BY 1
        InputTable ('ibm_stock1')
        OutputTable ('ibm_stock1_split')
        PartitionByColumns ('id')
        OrderByColumns ('period')
        SplitCount (50)
        Accumulate ('stockprice')
        ReturnStatsTable ('false')
        )
      ) AS input_table PARTITION BY id ORDER BY period
      TimeColumn ('period')
      TimeInterval (86400)
      InterpolationType ('linear')
      ValueColumns ('stockprice')
      Accumulate ('id')
      DuplicateRowsCount (2)
    );

    The first choice, using separate SQL-MapReduce calls for SeriesSplitter and the function that uses it, provides better performance than the second choice.