Skip to main content

Pentaho+ documentation is moving!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

ITable

pentaho.data. ITable

The ITable interface exposes the data and metadata of a tabular dataset.

Source: doc-js/pentaho/data/ITable.jsdoc, line 17

Methods

Name Description
filter(filter) : pentaho.data.TableView

Returns a view for the subset of rows of a data table that are selected by this filter.

filterMatchesRow(filter, rowIndex) : boolean

Gets a value that indicates if a given filter includes a given row.

getCell(rowIndex, colIndex) : pentaho.data.ICell

Gets a cell, given its row and column indexes.

getCellProperty(rowIndex, colIndex, propName) : *

Gets a cell property, given its row and column indexes and the property name.

getColumnHierarchyName(colIndex) : string

Gets the name of the hierarchy of a column's attribute, if any, given its index.

getColumnHierarchyOrdinal(colIndex) : number

Gets the ordinal in the hierarchy of a column's attribute, if any, given its index.

getColumnId(colIndex) : string

Gets the id of a column, given its index.

getColumnIndexByAttribute(attr) : number
Deprecated

Gets the index of the first column having a given attribute.

getColumnIndexById(id) : number

Gets the index of the first column having a given identifier.

getColumnLabel(colIndex) : string

Gets the label of a column, given its index.

getColumnProperty(colIndex, propName) : *

Gets a metadata property of a column, given the column index and property name.

getColumnType(colIndex) : string

Gets the type name of the values of a column's attribute, given its index.

getFormattedValue(rowIndex, colIndex) : string

Gets a best-effort formatted value of a cell, given its row and column indexes.

getLabel(rowIndex, colIndex) : string | undefined

Gets the formatted value property of a cell, given its row and column indexes.

getNumberOfColumns() : number

Gets the number of columns.

getNumberOfRows() : number

Gets the number of rows.

getValue(rowIndex, colIndex) : *

Gets the value of a cell, given its row and column indexes.

getValueKey(rowIndex, colIndex) : string

Gets the key of the value of a cell, given its row and column indexes.

isColumnKey(colIndex) : boolean

Gets a value that indicates if a column's values identify each row, together with other key columns, given its index.

Methods Details

filter(filter) : pentaho.data.TableView

Returns a view for the subset of rows of a data table that are selected by this filter.

Source: doc-js/pentaho/data/ITable.jsdoc, line 210

Parameters:
Name Default Value Summary
filter : pentaho.data.filter.Abstract

The filter.

Returns:
Name Description
pentaho.data.TableView

A view of the filtered data table.

Throws:
Name Description
pentaho.type.ValidationError

When the filter is not valid, the first error returned by the validate method.

filterMatchesRow(filter, rowIndex) : boolean

Gets a value that indicates if a given filter includes a given row.

Source: doc-js/pentaho/data/ITable.jsdoc, line 195

Parameters:
Name Default Value Summary
filter : pentaho.data.filter.Abstract

The filter.

rowIndex : number

The row index (zero-based).

Returns:
Name Description
boolean

true if the filter includes the row; false, otherwise.

Throws:
Name Description
pentaho.type.ValidationError

When the filter is not valid, the first error returned by the validate method.

getCell(rowIndex, colIndex) : pentaho.data.ICell

Gets a cell, given its row and column indexes.

Depending on the underlying implementation, this method may allocate memory.

Source: doc-js/pentaho/data/ITable.jsdoc, line 108

Parameters:
Name Default Value Summary
rowIndex : number

The row index (zero-based).

colIndex : number

The column index (zero-based).

Returns:
Name Description
pentaho.data.ICell

The specified cell object.

getCellProperty(rowIndex, colIndex, propName) : *

Gets a cell property, given its row and column indexes and the property name.

Source: doc-js/pentaho/data/ITable.jsdoc, line 120

Parameters:
Name Default Value Summary
rowIndex : number

The row index (zero-based).

colIndex : number

The column index (zero-based).

propName : string

The name of the property.

Returns:
Name Description
*

The cell property value or undefined, if there is no such cell or property.

getColumnHierarchyName(colIndex) : string

Gets the name of the hierarchy of a column's attribute, if any, given its index.

Source: doc-js/pentaho/data/ITable.jsdoc, line 86

Parameters:
Name Default Value Summary
colIndex : number

The column index (zero-based).

Returns:
Name Description
string | null

The name of the hierarchy.

See also: pentaho.data.ITable#getColumnHierarchyOrdinal

getColumnHierarchyOrdinal(colIndex) : number

Gets the ordinal in the hierarchy of a column's attribute, if any, given its index.

Source: doc-js/pentaho/data/ITable.jsdoc, line 97

Parameters:
Name Default Value Summary
colIndex : number

The column index (zero-based).

Returns:
Name Description
number | null

The ordinal of the attribute in the hierarchy.

See also: pentaho.data.ITable#getColumnHierarchyName

getColumnId(colIndex) : string

Gets the id of a column, given its index.

Source: doc-js/pentaho/data/ITable.jsdoc, line 40

Parameters:
Name Default Value Summary
colIndex : number

The column index (zero-based).

Returns:
Name Description
string

The id of the column.

getColumnIndexByAttribute(attr) : number
Deprecated

Gets the index of the first column having a given attribute.

Source: doc-js/pentaho/data/ITable.jsdoc, line 224

Parameters:
Name Default Value Summary
attr : string

The name of an attribute.

Returns:
Name Description
number

The (0-based) index of the column having the specified attribute, if any, or -1, if none.

See also: pentaho.data.ITable#getColumnIndexById

getColumnIndexById(id) : number

Gets the index of the first column having a given identifier.

Source: doc-js/pentaho/data/ITable.jsdoc, line 238

Parameters:
Name Default Value Summary
id : string

The column identifier.

Returns:
Name Description
number

The (0-based) index of the first column having the specified identifier, if any, or -1, if none.

getColumnLabel(colIndex) : string

Gets the label of a column, given its index.

Source: doc-js/pentaho/data/ITable.jsdoc, line 49

Parameters:
Name Default Value Summary
colIndex : number

The column index (zero-based).

Returns:
Name Description
string

The label of the column.

getColumnProperty(colIndex, propName) : *

Gets a metadata property of a column, given the column index and property name.

Source: doc-js/pentaho/data/ITable.jsdoc, line 76

Parameters:
Name Default Value Summary
colIndex : number

The column index (zero-based).

propName : string

The metadata property name.

Returns:
Name Description
*

The metadata property value.

getColumnType(colIndex) : string

Gets the type name of the values of a column's attribute, given its index.

Source: doc-js/pentaho/data/ITable.jsdoc, line 58

Parameters:
Name Default Value Summary
colIndex : number

The column index (zero-based).

Returns:
Name Description
string

The type name.

getFormattedValue(rowIndex, colIndex) : string

Gets a best-effort formatted value of a cell, given its row and column indexes.

If the cell has a specified label, then the string representation of that value is returned.

Otherwise, if the cell has a specified value, then the string representation of that value is returned.

When both the cell's formatted value and value are null or undefined, then an empty string is returned.

Contrast this method with pentaho.data.ITable#getLabel, that only returns a formatted value when one has been explicitly defined in the cell's f property.

Source: doc-js/pentaho/data/ITable.jsdoc, line 172

Parameters:
Name Default Value Summary
rowIndex : number

The row index (zero-based).

colIndex : number

The column index (zero-based).

Returns:
Name Description
string

The cell's formatted value.

getLabel(rowIndex, colIndex) : string | undefined

Gets the formatted value property of a cell, given its row and column indexes.

This method returns the string representation of the cell's f property, when it is defined, or undefined, otherwise.

Contrast this method with pentaho.data.ITable#getFormattedValue, that returns a best-effort formatted value in all cases.

Source: doc-js/pentaho/data/ITable.jsdoc, line 156

Parameters:
Name Default Value Summary
rowIndex : number

The row index (zero-based).

colIndex : number

The column index (zero-based).

Returns:
Name Description
string | undefined

The specified formatted value or undefined.

getNumberOfColumns() : number

Gets the number of columns.

Source: doc-js/pentaho/data/ITable.jsdoc, line 24

Returns:
Name Description
number

The number of columns.

getNumberOfRows() : number

Gets the number of rows.

Source: doc-js/pentaho/data/ITable.jsdoc, line 32

Returns:
Name Description
number

The number of rows.

getValue(rowIndex, colIndex) : *

Gets the value of a cell, given its row and column indexes.

When a cell is missing or has a null or undefined value, then null is returned.

Source: doc-js/pentaho/data/ITable.jsdoc, line 131

Parameters:
Name Default Value Summary
rowIndex : number

The row index (zero-based).

colIndex : number

The column index (zero-based).

Returns:
Name Description
*

The cell's value.

getValueKey(rowIndex, colIndex) : string

Gets the key of the value of a cell, given its row and column indexes.

When a cell contains the null value, its key is the empty string, "".

Source: doc-js/pentaho/data/ITable.jsdoc, line 144

Parameters:
Name Default Value Summary
rowIndex : number

The row index (zero-based).

colIndex : number

The column index (zero-based).

Returns:
Name Description
string

The key of the cell's value.

isColumnKey(colIndex) : boolean

Gets a value that indicates if a column's values identify each row, together with other key columns, given its index.

Source: doc-js/pentaho/data/ITable.jsdoc, line 67

Parameters:
Name Default Value Summary
colIndex : number

The column index (zero-based).

Returns:
Name Description
boolean

true, if the column is a key column; false, otherwise.