LISp-Miner Control Language Reference, version: 27.18.15 of 2 Mar 2022

Class DataTable

Database table meta-information
inherits from LMWrapName
namespace: lm.explore

Constructor

No constructor available. Objects of this class could not be instantiated from Lua scripts.

Properties List

DataColumnCount  Number of data columns
ID  Unique identifier (primary key) of the object
LocalDataCacheFlag  Whether to store locally bitstrings for categorized attributes based on this matrix
Name  Unique name of this object. Cannot be empty.
Note  Text comment to this object (up to 255 characters)
RecordCount  Number of data rows
RowCount  Number of data rows (an alias for RecordCount)

Methods List

canDel () Returns true if the object could be deleted (is not used)
clearLocalDataCache () Clears local data cache for attributes based on columns of this database table
findDataColumn () Tries to look-up a DataColumn with a unique property given as parameter. Just one parameter has to be specified. Returns nil if DataColumn with this property doesn't exists.
getDataColumnCount () Returns number of data columns in the table, the value of DataColumnCount property
getDataTableSubTypeCode () Returns code of sub-type of this database table, see DataTableSubType codes
getDataTableSubTypeKey () Returns unique string key of sub-type of this database table
getDataTableSubTypeName () Returns string representation of sub-type of this database table
getID () Returns unique identifier (primary key) of the object
getName () Returns the value of Name property, name of this object
getNote () Returns the value of Note property
getRecordCount () Returns number of rows in the table, the value of RecordCount property
getRowCount () Returns number of rows in the table, the value of RecordCount property
checkPrimaryKey () Checks the primary key and returns true if it is properly set and truelly unique
init () Initializes the table (computes number of rows and columns-statistics). If an error occurs, the script execution is stopped.
isInitialized () Returns true when the table is properly initialized and categorized attributes could be created based on it
isLocalDataCacheFlag () Returns the value of LocalDataCacheFlag property
isPrimaryKeyDefined () Returns true whe the primary keys is defined
isReady () Returns true when table is physically present in the analyzed database
markPrimaryKey () Marks a column to serve as the primary key for this table
onAdd () Store the newly created object into metabase
onDel () Delete the object from metabase (fails if canDel returns false)
onUpdate () Save changes made to the object into metabase
prepareDataColumnArray () Returns array of DataColumns (columns in this table)
setLocalDataCacheFlag () Sets the value of LocalDataCacheFlag property
setName () Sets the value of Name property, name of this object (must be unique)
setNote () Sets the value of Note property
unpackMultiColumnFields () Unpacks contents of all multi-columns into derived DataColumn based on meta-data information from import. For datasets with more than 255 columns.

Properties

DataColumnCount  (read-only) : integer
Number of data columns
ID  (read-only) : integer
Unique identifier (primary key) of the object
Intherited from: LMWrap
LocalDataCacheFlag : boolean
Whether to store locally bitstrings for categorized attributes based on this matrix
Name : string
Unique name of this object. Cannot be empty.
Intherited from: LMWrapName
Note : string
Text comment to this object (up to 255 characters)
Intherited from: LMWrapName
RecordCount  (read-only) : integer
Number of data rows
RowCount  (read-only) : integer
Number of data rows (an alias for RecordCount)

Methods

canDel() : boolean
Returns true if the object could be deleted (is not used)
Intherited from: LMWrap

Returns

  • boolean
clearLocalDataCache()
Clears local data cache for attributes based on columns of this database table
findDataColumn() : DataColumn
Tries to look-up a DataColumn with a unique property given as parameter. Just one parameter has to be specified. Returns nil if DataColumn with this property doesn't exists.

Parameters

  • luaTable - to store named parameters

Optional named parameters

  • nID : integer - an ID of the table column to look-up
  • name : string - a name of the table column to look-up

Returns

getDataColumnCount() : integer
Returns number of data columns in the table, the value of DataColumnCount property

Returns

  • integer
getDataTableSubTypeCode() : integer
Returns code of sub-type of this database table, see DataTableSubType codes

Returns

  • integer
getDataTableSubTypeKey() : string
Returns unique string key of sub-type of this database table

Returns

  • string
getDataTableSubTypeName() : string
Returns string representation of sub-type of this database table

Returns

  • string
getID() : integer
Returns unique identifier (primary key) of the object
Intherited from: LMWrap

Returns

  • integer
getName() : string
Returns the value of Name property, name of this object
Intherited from: LMWrapName

Returns

  • string
getNote() : string
Returns the value of Note property
Intherited from: LMWrapName

Returns

  • string
getRecordCount() : integer
Returns number of rows in the table, the value of RecordCount property

Returns

  • integer
getRowCount() : integer
Returns number of rows in the table, the value of RecordCount property

Returns

  • integer
checkPrimaryKey() : boolean
Checks the primary key and returns true if it is properly set and truelly unique

Returns

  • boolean
init()
Initializes the table (computes number of rows and columns-statistics). If an error occurs, the script execution is stopped.
isInitialized() : boolean
Returns true when the table is properly initialized and categorized attributes could be created based on it

Returns

  • boolean
isLocalDataCacheFlag() : boolean
Returns the value of LocalDataCacheFlag property

Returns

  • boolean
isPrimaryKeyDefined() : boolean
Returns true whe the primary keys is defined

Returns

  • boolean
isReady() : boolean
Returns true when table is physically present in the analyzed database

Returns

  • boolean
markPrimaryKey()
Marks a column to serve as the primary key for this table

Parameters

  • luaTable - to store named parameters

Optional named parameters

  • pDataColumn : DataColumn - table column to set-up as the primary key
  • columnName : string - a name of the table column to set-up as the primary key
onAdd()
Store the newly created object into metabase
Intherited from: LMWrap
onDel()
Delete the object from metabase (fails if canDel returns false)
Intherited from: LMWrap
onUpdate()
Save changes made to the object into metabase
Intherited from: LMWrap
prepareDataColumnArray() : luaTable
Returns array of DataColumns (columns in this table)

Returns

  • luaTable
setLocalDataCacheFlag( boolean )
Sets the value of LocalDataCacheFlag property

Parameters

  • boolean
setName( string )
Sets the value of Name property, name of this object (must be unique)
Intherited from: LMWrapName

Parameters

  • string - cannot be empty
setNote( string )
Sets the value of Note property
Intherited from: LMWrapName

Parameters

  • string
unpackMultiColumnFields()
Unpacks contents of all multi-columns into derived DataColumn based on meta-data information from import. For datasets with more than 255 columns.

Parameters

  • luaTable - to store named parameters

Obligatory named parameters

  • pathNameSrc : string - path to source file

Optional named parameters

  • cColumnSeparator : char - column delimiter character
  • pathNameSrcMetadata : string - path to meta-data description file (first line= alternative columns names, second line= forced data types, third line= disabled columns (any of 'no', 'disabled', 'skip' will cause a column to be ommited from import)