Management command vs query command

Ankit Awadhiya 55 Reputation points
2023-09-18T20:25:59.4+00:00

When creating KustoConnectionStringBuilder for ICslAdminProvider, when do we use connection string vs Ingest url? whats the difference between two?

I know to use .purge command we need to use ingest url, where when using .set command we use connection string.

I didnt find anything in the docs. Please provide me with the explanation or if there is doc link for it.

Thanks

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
529 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 32,736 Reputation points MVP
    2023-09-18T20:55:52.0633333+00:00

    Hello @Ankit Awadhiya ,

    Microsoft provides multiple SDKs for working with Azure Data Explorer:

    User's image

    If you want to ingest data, try Kusto.Ingest:

    Microsoft.Azure.Kusto.Ingest library is a .NET 4.7.2 library for ingesting data into your cluster.

    Here is a blog post explaining how to use this SDK. It references the ingestion URL for direct or queued ingestion.

    The ICslAdminProvider class you mention is part of the Kusto.Data library:

    You create either a query client (ICslQueryProvider) or a management command provider (ICslAdminProvider) from a connection string object pointing at the Kusto engine service

    The Kusto Client SDK (Kusto.Data) exposes a programmatic API similar to ADO.NET, so using it should feel natural for users experienced with .NET. You can then issue data queries or management commands by specifying the appropriate Kusto Query Language string.

    I'm not sure about your statement regarding the .purge command.

    It seems this is something related to the admin provider:

    using var client = KustoClientFactory.CreateCslAdminProvider(connectionStringBuilder);
    var command = CslCommandGenerator.GeneratePurgeTableCommand("tableName");
    using var reader = client.ExecuteControlCommand(command); 
    

    I recommend experimenting with the SDKs and some test data first.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.