A special table type is used to handle database table lookups with optional caching in memory. All of the following column references may be either numeric (column index, starts at 0) or string (column name).
...
Note | ||
---|---|---|
| ||
For MS SQL, the column type timestamp is not supported in tables accessed by by . Use column type datetime instead. |
sqlExec
The sqlExec function is used when updating and inserting data into tables. It returns an integer value stating how many rows were updated/inserted. SQL errors will cause runtime errors (the workflow aborts).
...
Parameter | Description | |||||
---|---|---|---|---|---|---|
| Name of the database where the table resides, including folder name. | |||||
| SQL query to send to the database. Note that SQL statements must not end with ';'. Calls to stored procedures must be embedded in blocks.
| |||||
Returns | An integer equaling the number of rows updated or inserted. |
tableCreate
Returns a table that holds the result of a database query. SQL errors in the table lookup will cause runtime errors (workflow aborts).
...
Parameter | Description | ||
---|---|---|---|
| Name of the database where the table resides | ||
| SQL query to send to the database. Note that SQL statements must not end with ';'. Only columns of type number, date and string are supported. | ||
| An optional parameter to disable the commit statement from being performed at the end of every SQL transaction for this particular function. Setting this parameter to false will result in the commit statement to be performed at the end of every SQL transaction for this particular function. By default, will have the disableCommit set to true unless otherwise changed via this parameter.
| ||
Returns | A table |
...
Info | ||
---|---|---|
| ||
To avoid performance problems, the table must be read from the database as seldom as possible. For instance, once for each workflow invocation.
|
kustoTableCreate
The kustoTableCreate function looks up information in Kusto databases. The resulting table is of the same type as that resulting from tableCreate, meaning that it can be used together with functions such as tableLookup, tableGet etc.
The format of this function is the following:
|
Parameter | Description |
---|---|
profileName | The name of the profile used. This should be an Azure Profile of the type Azure Data Explorer |
databaseName | The name of the database in Azure. The cluster name is specified in the Azure profile |
query | The query to apply to the database in question. This is written in the Kusto Query Language, see example below. |
kustoTableCreate Example
|
The Kusto data types will be interpreted as the following types in the resulting table object:
Azure Type | APL Type |
---|---|
bool | boolean |
datetime | date |
dynamic | string |
int | int |
long | long |
real | bigdec |
string | string |
decimal | bigdec |
timespan | string |
tableCreateIndex
Creates an index for one or several columns of a table. This will greatly increase the efficiency of subsequent tableLookup calls on these columns using the equality operator. If the column already has an index, this function has no effect.
...
Info | ||
---|---|---|
| ||
|
tableGet
The tableGet function returns the value of a table entry. The value is returned as an any object, which means the returned value is of the same type as the value extracted.
...
Parameter | Description |
---|---|
| A table object |
| The row index. The first row is indexed 0 (zero). |
| Column index or name. The first column is indexed 0 (zero). |
Returns | Any depending on the column type |
tableLookup
The tableLookup function returns a table containing all the rows of the original table matching the specified column value(s). At least one pair of (column, operator, value) group must be specified.
...
Info | ||
---|---|---|
| ||
|
tableRowCount
The tableRowCount function returns the number of rows in a table.
...