Forum Discussion

peeyee's avatar
peeyee
New Member
1 year ago
Solved

How to load a package by M

Hi, support team:   Does M have the  ability to load a package(written by other languages)? I've searched through the docs, but didn't find any relevant information.  
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi peeyee,
    Thanks for reaching out to the Microsoft fabric community forum.

    As the query is for a way to load any external package in M-Query, there is no direct way to load any external packages or libraries written in other programming languages like Python, R, C#.


    If you still need any functionality from another language, Power BI allows you to include Python or R scripts as part of your queries using which you can execute Python or R code to process data and then bring the results into Power Query.

    For more details on this you can refer to the following links -

    https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-python-scripts

    https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-r-scripts

     

    You can also use APIs, if the external functionality is exposed through REST API. We use "Web.Contents" function to implement API integration in M-Query. This fucntion sends HTTP requests and retrieves responses in JSON, XML, or other formats.

     

    If this post helps, then please consider Accept it as the solution and give a Kudos to help the other members find it more quickly. If you have any other queries you can reach out to community forum for assistance.

    Thank you.