# Kusto bindings for Azure Functions - Preview
This repository contains the Kusto bindings for Azure Functions extension code as well as a quick start tutorial and samples illustrating how to use the binding in different ways. The types of bindings supported are:
Takes a KQL query or KQL function to run (with optional parameters) and returns the output to the function. The input binding takes the following attributes
Database: The database against which the query has to be executed
ManagedServiceIdentity: A managed identity can be used to connect to Kusto. To use a System managed identity, use "system", any other identity names are interpreted as user managed identity
KqlCommand: The KqlQuery that has to be executed. Can be a KQL query or a KQL Function call
KqlParameters: Parameters that act as predicate variables for the KqlCommand. For example "@name={name},@Id={id}" where the parameters {name} and {id} will be substituted at runtime with actual values acting as predicates
Connection: The name of the variable that holds the connection string, resolved through environment variables or through function app settings. Defaults to lookup on the variable KustoConnectionString, at runtime this variable will be looked up against the environment.
Documentation on connection string can be found at Kusto connection strings
e.g.:
"KustoConnectionString": "Data Source=https://_**cluster**_.kusto.windows.net;Database=_**Database**_;Fed=True;AppClientId=_**AppId**_;AppKey=_**AppKey**_;Authority Id=_**TenantId**_
Note that the application id should atleast have viewer privileges on the table(s)/function(s) being queried in the KqlCommand
ClientRequestProperties: Optional attribute to pass client request properties to the Kusto client
Starting versions 1.0.8-Preview there is support for management commands. A sample is available here
Takes row(s) and inserts them into the Kusto table .
Database: The database against which the query has to be executed
TableName: The table to ingest the data into
ManagedServiceIdentity: A managed identity can be used to connect to Kusto. To use a System managed identity, use "system", any other identity names are interpreted as user managed identity
Connection: Refer Connection attribute above.Note that the application id should have ingest privileges on the table being ingested into
MappingRef: Optional attribute to pass a mapping ref that is already defined in the ADX cluster
DataFormat: The default dataformat is multijson/json
. This can be set to text formats supported in the datasource format enumeration. Samples are validated and provided for csv and JSON formats.
IngestionType: Optional attribute to different ingestion types. Supported values are queued ingestion or managed ingestion which attempts streaming ingest falling back to queued ingestion. The default value is managed
IngestionProperties: Optional attribute pertinent to queued ingestion type. When using queued ingestion, the following values can be specified
This is specified as @flushImmediately=false,@pollIntervalSeconds=15,@pollTimeoutMinutes=5
like other kusto binding properties.
Samples for C# are available and available at the following. This can run with local functions framework. Setup required for the run is available at the location
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.