
Send a SQL query using an Azure AD access token The following example is identical to the previous one, except that SQLĪuthentication is done by username/password. Send a SQL query using Username/Password authentication 'Authentication="Active Directory Integrated" ' SQL queries should be constructed to return the smallest data set possible, since the Kusto optimizer doesn't attempt to optimize queries between Kusto and SQL. This example should not be taken as a recommendation to filter or project data in this manner. Authentication reuses the calling user's Azure AD token. The following example sends a SQL query to an Azure SQL DB database. Examples Send a SQL query using Azure AD-integrated authentication It is therefore recommended to always specify it.Īn error is raised if the run-time schema of the first rowset returned by the SQL network endpointĭoesn't match the OutputSchema schema. In scenarios (such as a cross-cluster query) which would otherwise prevent it from running,Īnd enables multiple query optimizations.

Specifying this argument allows the plugin to be used

The optional OutputSchema argument has the following syntax: The names and types for the expected columns of the sql_request plugin output. Currently, only token can be set, to pass a caller-provided Azure AD access token that is forwarded to the SQL endpoint for authentication. Holds more advanced settings as key-value pairs. Holds key-value pairs to pass as parameters along with the query. Must return one or more row sets, but only the first one is made available for the rest of the Kusto query. Indicates the query that is to be executed against the SQL endpoint.
BASEELEMENTS PLUGIN AUTHENTICATE TO SQL DATASOURCE HOW TO
See valid methods of authentication and how to specify the network endpoint. Indicates the connection string that points at the SQL Server network endpoint. SyntaxĮvaluate sql_request ( ConnectionString, SqlQuery ] ) Arguments Name

The plugin is invoked with the evaluate operator. If more than one rowset is returned by SQL, only the first one is used. The sql_request plugin sends a SQL query to a SQL Server network endpoint and returns the results.
