Histogram_Map function - need help

Aster
Teradata Employee

Histogram_Map function - need help

I am strugglign with this function.  My error is the following which confuses me because I thought those clauses were optional.

>[Error] Script lines: 1-6 --------------------------

[AsterData][NClusterJDBCDSII](34) ERROR: SQL-MR function HISTOGRAM_MAP failed: Please specify either the INTERVAL clause or all of the following clauses: BIN_SIZE, START_VALUE. () _

My data (p2p.wt_session_histogram) is simply 2 columns:

customer_id and cnt_sessions (integer count)

select *

from histogram_map

(

on p2p.wt_session_histogram

value_column ('cnt_sessions')

);

Tags (1)
3 REPLIES
Senior Apprentice

Re: Histogram_Map function - need help

Not all those clauses are optional, they're just mutually exclusive.

The error message is correct, you have to specify either both BIN_SIZE and START_VALUE or INTERVALS.

If there was a default it might be the minimum value based on the data type (e.g. -2.147.483.648 for an INT) and a bin size of 1, you probbay don't want that :-)

Teradata Employee

Re: Histogram_Map function - need help

Thanks, Dieter! I was able to get it to run but I was expecting to get a graphical output: literally - a histogram.  Do you know if an Aster function that will generate this?  Thanks, Wendy

Senior Apprentice

Re: Histogram_Map function - need help

Hi Wendy,

the histogram_map/histogram_reduce combination only creates tabular output.

As Aster Lens only supports NpathViz and CFilterViz output you need a visualization tool to get graphical output.