Query Property

General info

Label

Query

Description

The query which will be executed. Dynamic parameters will be replaced at runtime (__STARTIME__, __STARTTIMELOCAL__, __ENDTIME__, __ENDTIMELOCAL__ and dynamic variables)

Data type

String

Type

Regular

Code

6454

Symbolic name

MODEL_PROP_QUERY

Lua access code

inmation.model.properties.Query

Parent properties

QueryExecution

Attributes

Name Tooltip
PROP_CONFIGURABLE The property is configurable and can be changed with DataStudio and the various inmation APIs
PROP_VISIBLE The property is visible in DataStudio and can be read by the inmation APIs

Examples

Read from or write to the Query property.

  • Lua

  • C#

-- Read from the Query
inmation.getvalue("<OBJECT FULL PATH>.ODBCDatasource.QueryExecution.Query")

-- Write to the Query
inmation.setvalue("<OBJECT FULL PATH>.ODBCDatasource.QueryExecution.Query", "new value")
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "so", Password = "inmation" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the Query
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.ODBCDatasource.QueryExecution.Query"));
// Write to the Query
Result result = sli.WriteValue(sc, new WriteItem("new value", "<OBJECT FULL PATH>.ODBCDatasource.QueryExecution.Query"));