Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
titleNote!

For MS SQL, the column type timestamp is not supported in tables accessed by by Image Added . Use column type datetime instead. 

...

ParameterDescription

dbProfile

Name of the database where the table resides

sqlQuery

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.

disableCommit

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, Image Added will have the disableCommit set to true unless otherwise changed via this parameter.

Info

It should be noted that on recent Oracle versions, the DBLink SQL transaction behaviour has changed, where every single SQL statement for remote database transaction requires a commit or rollback statement in order to close a connection.


Returns

A table

...

The format of this function is the following: 

table kustoTableCreate(string profileName, string, databaseName, string query)


Parameter

Description

profileNameThe name of the profile used. This should be an Azure Profile of the type Azure Data Explorer
databaseNameThe name of the database in Azure. The cluster name is specified in the Azure profile
queryThe query to apply to the database in question. This is written in the Kusto Query Language, see example below.


kustoTableCreate Example

table result = kustoTableCreate("Default.AZDLookupDb", "lookupdb", "test  | where isnotnull(BeginLocation) | project EpisodeNarrative, EventNarrative | limit 5000");

The Kusto data types will be interpreted as the following types in the resulting table object:

Azure Type

APL Type

boolboolean
datetimedate
dynamicstring
intint
longlong
realbigdec
stringstring
decimalbigdec
timespanstring

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.

...