I'm trying to create an Azure Function that queries the adx database.
In my function I have an object that I would like to pass to the stored function in adx as the parameter.
In the function I'm using this in the in the code but getting an error and SetParameter
only takes a string.
queryGetTransaction = "declare query_parameters(ID:dynamic); GetTransaction(ID)";
I set that dynamic parameter with ClientRequestProperties
if "ID" is the object:
ClientRequestProperties clientRequestProperties = new ClientRequestProperties();
clientRequestProperties.SetParameter("identifiervalue", ID)
I'm getting this error:
Text=declare query_parameters(ID:dynamic); GetTransaction(ID)
SemanticErrors='ID' invalid query parameter type (expected 'dynamic)
If I'm not doing this correctly can I pass an object to the stored function and use that for parameters in the where?
private static readonly string queryGetIDs = "declare query_parameters(idvalue:dynamic); GetIds(idvalue)";
public async Task<List<ID>> GetIDs(ID ids)
{
IDataReader reader = null;
var serviceUri = URL To ADX ;
var kustoConnectionStringBuilder = new KustoConnectionStringBuilder(serviceUri).WithAadSystemManagedIdentity();
var client = KustoClientFactory.CreateCslQueryProvider(kustoConnectionStringBuilder);
ClientRequestProperties clientRequestProperties = new ClientRequestProperties();
clientRequestProperties.SetParameter("idvalue", ids);
reader = await client.ExecuteQueryAsync("TableName", queryGetIDs, clientRequestProperties);
}