org.knime.base.node.preproc.groupby
Class BigGroupByTable

java.lang.Object
  extended by org.knime.base.node.preproc.groupby.GroupByTable
      extended by org.knime.base.node.preproc.groupby.BigGroupByTable

public class BigGroupByTable
extends GroupByTable

A data table that groups a given input table by the given columns and calculates the aggregation values of the remaining rows. Call the GroupByTable.getBufferedTable() method after instance creation to get the grouped table. If the enableHilite flag was set to true call the GroupByTable.getHiliteMapping() method to get the row key translation Map. Call the GroupByTable.getSkippedGroupsByColName() method to get a Map with all skipped groups or the GroupByTable.getSkippedGroupsMessage(int, int) for a appropriate warning message.

Author:
Tobias Koetter, University of Konstanz

Constructor Summary
BigGroupByTable(ExecutionContext exec, BufferedDataTable inDataTable, List<String> groupByCols, ColumnAggregator[] colAggregators, GlobalSettings globalSettings, boolean sortInMemory, boolean enableHilite, ColumnNamePolicy colNamePolicy, boolean retainOrder)
          Constructor for class BigGroupByTable.
 
Method Summary
protected  BufferedDataTable createGroupByTable(ExecutionContext exec, BufferedDataTable table, DataTableSpec resultSpec, int[] groupColIdx)
          
 
Methods inherited from class org.knime.base.node.preproc.groupby.GroupByTable
addHiliteMapping, addSkippedGroup, appendOrderColumn, checkGroupCols, createGroupByTableSpec, createSkippedGroupName, getBufferedTable, getColAggregators, getGlobalSettings, getGroupCols, getHiliteMapping, getSkippedGroupsByColName, getSkippedGroupsMessage, isEnableHilite, isRetainOrder, isSortInMemory, sortTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BigGroupByTable

public BigGroupByTable(ExecutionContext exec,
                       BufferedDataTable inDataTable,
                       List<String> groupByCols,
                       ColumnAggregator[] colAggregators,
                       GlobalSettings globalSettings,
                       boolean sortInMemory,
                       boolean enableHilite,
                       ColumnNamePolicy colNamePolicy,
                       boolean retainOrder)
                throws CanceledExecutionException
Constructor for class BigGroupByTable.

Parameters:
exec - the ExecutionContext
inDataTable - the table to aggregate
groupByCols - the name of all columns to group by
colAggregators - the aggregation columns with the aggregation method to use in the order the columns should be appear in the result table numerical columns
globalSettings - the global settings
sortInMemory - true if the table should be sorted in the memory
enableHilite - true if a row key map should be maintained to enable hiliting
colNamePolicy - the ColumnNamePolicy for the aggregation columns
retainOrder - returns the row of the table in the same order as the input table if set to true
Throws:
CanceledExecutionException - if the user has canceled the execution
Method Detail

createGroupByTable

protected BufferedDataTable createGroupByTable(ExecutionContext exec,
                                               BufferedDataTable table,
                                               DataTableSpec resultSpec,
                                               int[] groupColIdx)
                                        throws CanceledExecutionException

Specified by:
createGroupByTable in class GroupByTable
Parameters:
exec - the ExecutionContext
table - the data table to aggregate
resultSpec - the result DataTableSpec
groupColIdx - the group column indices
Returns:
the aggregated input table
Throws:
CanceledExecutionException - if the operation has been canceled


Copyright, 2003 - 2012. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.