7.00.02 - SQL-MapReduce Calls - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Published
September 2017
Content Type
Programming Reference
User Guide
Publication ID
B700-1022-700K
Language
English (United States)
Last Update
2018-04-17

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.