Can we connect the data from Kusto to Azure Machine Learning Studio directly ?

Nguyen Huu Minh Tri (UTOP.PROD) 1 Reputation point
2022-09-14T01:55:35.263+00:00

Hi everyone,
Please help me to verify that is there anyway to connect the data from Kusto (KQL/ADX) to use on Azure ML Studio. I have tried the solution alternatively that I exported the data from Kusto and them imported them to the instance container on Azure Portal, then link them to the Datastore of Azure ML Studio.

As I researched, there is a suggestion as : https://learn.microsoft.com/en-us/python/api/azureml-pipeline-steps/azureml.pipeline.steps.kustostep?view=azure-ml-py

But I dont know whether that is a good approach? And how to implemented the "KustoStep" pipeline correctly?
Please help me if there is another way to connect the data directly from Kusto to Azure ML
Thank you so much !

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,840 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,155 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 44,761 Reputation points Microsoft Employee
    2022-09-14T09:01:49.703+00:00

    @Nguyen Huu Minh Tri (UTOP.PROD) This step can be used if you are looking to use the output of this step as input to another step, The output is the result of kusto queries run based on the configuration of this step. There is a sample notebook that is available in the azure ML notebook github repo for reference. This should be the sequence of running the step and using the output with another step.

    database_name = "<database_name>" # Name of the database to perform Kusto queries on  
    query_directory = "<query_directory>" # Path to folder that contains a text file with Kusto queries  
      
    kustoStep = KustoStep(  
        name='KustoNotebook',  
        compute_target=compute_name,  
        database_name=database_name,  
        query_directory=query_directory,  
        output=step_1_output,  
    )  
    step2_input = step_1_output.as_input("input_data")  
      
    step2 = PythonScriptStep(name="train_step",  
                       script_name="train.py",  
                       inputs=[step2_input],  
                       arguments=['--input_data', step2_input],  
                       compute_target='cpu_cluster',  
                       source_directory='./train',  
                       allow_reuse=True)  
      
    steps = [kustoStep, step2]  
    

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    0 comments No comments

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.