Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
MMacarie
Frequent Visitor

Use Fabric API to automate item creation and real time ingestion

Hi,

I recently started working with Fabric APIs and I am playing around with a script to automate the creation of resources and the ingestion of data from an IoT Hub source into a kusto table. I was able to easely create the items using a powershell script, but I’m having a hard time finding documentation on how to associate an ingestion mapping with an Eventstream.

In the UI, I can navigate to a table, select Get Data, and configure the Eventstream, where I have the option to choose an existing ingestion mapping and apply it, however, I haven’t been able to find anything on how to automate this process via the API. 

My goal is to ingest the entire message coming from the IoT Hub into a single column in the table, as a json string. The mapping I use in the UI looks like this:

.create-or-alter table <table_name> ingestion json mapping "<mapping_name>" '[{ "column": "<column_name>", "path": "$", "datatype": "string" }]';

On the official documentation I saw a few mentions of parameters like "ingestionMappingReference" and "mappingRuleName", but no example of them being used in the API context. Even the examples from GitHub lack those parameters, but given that they are mentioned I suppose there has to be a way of automating this, otherwise it seems like a major flaw.

Any suggestion would help, either if there is an Eventstream configuration parameter to set or a different API call I can use after creating the Eventstream. Anything helps 🙂

6 REPLIES 6
v-lgarikapat
Community Support
Community Support

Hi @MMacarie ,

 

Thank you for reaching out to the Microsoft Fabric community forum. I have included some learning documents that may help you better understand and resolve the issue.

 

Ingest JSON formatted data into Azure Data Explorer - Azure Data Explorer | Microsoft Learn

Eventstream REST API - Microsoft Fabric | Microsoft Learn

Quickstart: Get insights from your processed data - Azure IoT Operations | Microsoft Learn

Announcing REST APIs for Fabric Eventstream | Microsoft Fabric Blog | Microsoft Fabric

Ingestion mappings - Kusto | Microsoft Learn

Add and manage eventstream sources - Microsoft Fabric | Microsoft Learn

Get data from Eventstream - Microsoft Fabric | Microsoft Learn

 

We truly appreciate your continued engagement and thank you for being an active and valued member of the community.

If you're still experiencing any challenges, please don’t hesitate to reach out we’d be more than happy to assist you further.

We look forward to hearing from you.

Best regards,
Lakshmi

Hi @v-lgarikapat,

Thank you for your response, but I already navigated through the mentioned links. I understand how the process works, but I cannot figure out how to include the mapping parameter into the eventstream definition, or how to do it in another way such that my mapping is applied and maintained without the use of the UI. I want to see if I am able to fully automate this process.

Could you be able to give me an example or list some steps i can follow? The problem is not the concept itself, but the absence of an example or some clear mentions that it is possible for Fabric as well.

Thank you

Hi @MMacarie ,

Thanks for your response.

I recommend raising a support ticket so our support team can assist you directly.
Please refer to the following link for instructions on how to create a support ticket:

How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn

We appreciate your engagement and thank you for being an active part of the community.

Best regards,
Lakshmi

Hi @MMacarie , I just wanted to kindly follow up and check whether you had the opportunity to raise the support ticket.

 

Best Regards,

Lakshmi.

Hello @v-lgarikapat, yes I created a ticket and I am in contact with someone. Will update with a solution when I get a response from them.

Thank you,

Mihaela

Thanks for the confirmation

 

Best Regards

Lakshmi.

Helpful resources

Announcements
August Fabric Update Carousel

Fabric Monthly Update - August 2025

Check out the August 2025 Fabric update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors