How do I transfer or import the output a Jupyter Python Notebook script into a Power BI chart

Daryl M 0 Reputation points
2024-01-16T15:29:02.4633333+00:00

I want to establish whether in theory its possible to automate importing the output of a Jupyter notebook run in AWS's Sagemaker, which produces a Power BI formatted file, into MS Power BI of which I have an account, for visualisations purposes for my customer. Displaying adequate charts and generating visualisations using Power BI is the customers requirement, but manipulation of the underlying data is being carried out in AWS Sagemaker.
Is it possible to create an Azure App, which will enable authentication between AWS and MS, to enable automating transferring the output of Jupyter notebook(s) into Power BI so that the results can be visualised.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,351 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 29,666 Reputation points Microsoft Employee
    2024-01-16T22:31:20.0466667+00:00

    Hi @Daryl M, I'm not very familiar with AWS' Sagemaker, but from what you're describing, a Logic App or Power Automate Flow sounds like an appropriate solution. I would check Sagemaker REST API for an endpoint that represents the completed job that you currently have. You can leverage the HTTP action in Power Automate or Logic Apps to call your Sagemaker endpoint, providing the necessary input parameters, and process the output as necessary. You can utilize the Power BI connector to process the output of the API call. If Sagemaker supports webhooks, you can leverage HTTP trigger action in a Logic App where Sagemaker calls your Logic app indicating there is data to be processed or downloaded. Here's an example how you can use either Logic Apps or Power Automate with SageMaker:

    1. Create a new Logic App or Power Automate flow.
    2. Add a Recurrence trigger to the flow to run the flow at a specific interval.
    3. Add an HTTP action to the flow. In the HTTP action, specify the SageMaker CreateTrainingJob API endpoint and provide the necessary input parameters.
    4. Add an Azure AD action to the flow to authenticate the request.
    5. Add a Parse JSON action to the flow to parse the output from the SageMaker API.
    6. Add a Condition action to the flow to check if the training job was successfully created.
    7. If the training job was successfully created, add any additional actions to the flow that you need to process the output from the SageMaker API.
    8. If the training job was not successfully created, add an action to the flow to send an email notification or create a ticket in your ITSM system.
    9. Save and test the flow.
    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.