Skip to content
Reference > Classes

Datamodel

Definition

Datamodel var = .... ;

Extends

Extended By

None

Description

The datamodel objects on which visualizations are built. Datamodels can be viewed and edited by double-clicking on the green nodes in the datamodel graph (Dashboard -> Data Modeler...).

Method Summary

Owner Name Return Type Description
Datamodel exportConfig() Map Exports this datamodel's configuration to a map.
DashboardResource getCallback(callbackName) Callback Returns a callback by name
DashboardResource getCallbacks() Map Returns a map of all callback definitions.
DashboardResource getChildren() List Returns a list of the child dashboard resources.
Object getClassName() String Returns the string name of this object's class type.
Datamodel getConsecutiveRequeriesCount() Long Returns the number of times this datamodel has been auto-requeried. This number resets to zero once it is run by means other than a requery.
DashboardResource getDRI() String Returns the Dashboard Resource Indicator (DRI) as a string. DRI is the unique identifier of this resources within the entire dashboard.
DashboardResource getDashboardResourceType() String Returns the Dashboard Resource Type as a string
Datamodel getData() TableSet Returns a TableSet object that stores the column names of the underlying table and their respective types.
Datamodel getErrorsCount() Long Returns the number of times this datamodel has resulted in an error.
Datamodel getExecutedCount() Long Returns the number of times this datamodel has been executed.
Datamodel getExecutedTotalMillis() Long Returns the total execution time for this datamodel.
DashboardResource getFormula(formulaName) Formula Returns a Formula given the formula name.
DashboardResource getFormulaNames() Set Returns a set of the names of all formulas for this object.
DashboardResource getFormulas() Map Returns a map of all available formulas for this object. The key is the formula name.
Datamodel getId() String Returns this datamodel's name.
DashboardResource getLRI() String Returns the Localized Resource Indicator (LRI) as a string. LRI is the unique identifier of this resource with the parent element.
Datamodel getLastExecutionTime() UTC Returns the last execution time for this datamodel or null if the datamodel has not been run yet.
Datamodel getLayout() Layout Returns the layout that owns this datamodel.
Datamodel getNextExecutionTime() UTC Returns the next scheduled execution time for this datamodel or null if the datamodel does not have a next scheduled run time.
DashboardResource getOwner() DashboardResource Returns the DashboardResource that owns this object.
Datamodel getParameters() Map DEPRECATED... returns the input parameters with the associated defaults.
Datamodel getSourceDatamodels() List Returns a list of datamodels that this datamodel gets data from.
Datamodel getTargetDatamodels() List Returns a list of datamodels that this datamodel sends data to.
Datamodel getUid() String Returns this datamodel's id.
Datamodel getValue(key) Object Returns the value associated with the given key from this portlet's attributes. Returns null if key does not exist.
DashboardResource invokeCallback(callbackName, args) Object Executes the specified callback definition and returns the result from the callback.
DashboardResource isTransient() Boolean Returns true if this is transient, false otherwise. Transient objects are not saved to the layout.
Datamodel process(values) Boolean Schedules a datamodel to run with provided WHERE arguments, returns true on success. This will conflate executions if the arguments are the same, and is not a blocking call so the next amiscript will execute.
Datamodel processSync(values) Object Executes the datamodel immediately with the given WHERE arguments and is a blocking call. It returns the datamodel's return value.
Datamodel reprocess() Boolean Reruns the datamodel with the last given WHERE arguments, returns true on success. This call is not blocking and will conflate repeated executions like process.
Datamodel setValue(key, value) Boolean Adds the key value pair to this portlet's attributes and return true if the operation is successful.
Object toJson() String Returns a json representation of this object.

Method Definitions


exportConfig()

Map Datamodel::exportConfig()

Description

Exports this datamodel's configuration to a map.


getConsecutiveRequeriesCount()

Long Datamodel::getConsecutiveRequeriesCount()

Description

Returns the number of times this datamodel has been auto-requeried. This number resets to zero once it is run by means other than a requery.


getData()

TableSet Datamodel::getData()

Description

Returns a TableSet object that stores the column names of the underlying table and their respective types.


getErrorsCount()

Long Datamodel::getErrorsCount()

Description

Returns the number of times this datamodel has resulted in an error.


getExecutedCount()

Long Datamodel::getExecutedCount()

Description

Returns the number of times this datamodel has been executed.


getExecutedTotalMillis()

Long Datamodel::getExecutedTotalMillis()

Description

Returns the total execution time for this datamodel.


getId()

String Datamodel::getId()

Description

Returns this datamodel's name.


getLastExecutionTime()

UTC Datamodel::getLastExecutionTime()

Description

Returns the last execution time for this datamodel or null if the datamodel has not been run yet.


getLayout()

Layout Datamodel::getLayout()

Description

Returns the layout that owns this datamodel.


getNextExecutionTime()

UTC Datamodel::getNextExecutionTime()

Description

Returns the next scheduled execution time for this datamodel or null if the datamodel does not have a next scheduled run time.


getParameters()

Map Datamodel::getParameters()

Description

DEPRECATED... returns the input parameters with the associated defaults.


getSourceDatamodels()

List Datamodel::getSourceDatamodels()

Description

Returns a list of datamodels that this datamodel gets data from.


getTargetDatamodels()

List Datamodel::getTargetDatamodels()

Description

Returns a list of datamodels that this datamodel sends data to.


getUid()

String Datamodel::getUid()

Description

Returns this datamodel's id.


getValue(key)

Object Datamodel::getValue(String key)

Description

Returns the value associated with the given key from this portlet's attributes. Returns null if key does not exist.

Parameter Definition

Name Type Description
key String 

process(values)

Boolean Datamodel::process(Map values)

Description

Schedules a datamodel to run with provided WHERE arguments, returns true on success. This will conflate executions if the arguments are the same, and is not a blocking call so the next amiscript will execute.

Parameter Definition

Name Type Description
values Map  key/value params to pass in

processSync(values)

Object Datamodel::processSync(Map values)

Description

Executes the datamodel immediately with the given WHERE arguments and is a blocking call. It returns the datamodel's return value.

Parameter Definition

Name Type Description
values Map  key/value params to pass in

reprocess()

Boolean Datamodel::reprocess()

Description

Reruns the datamodel with the last given WHERE arguments, returns true on success. This call is not blocking and will conflate repeated executions like process.


setValue(key,value)

Boolean Datamodel::setValue(String key, Object value)

Description

Adds the key value pair to this portlet's attributes and return true if the operation is successful.

Parameter Definition

Name Type Description
key String 
value Object