Forum Discussion

jmeisenh's avatar
jmeisenh
Frequent Visitor
1 year ago
Solved

Multiple messages when new item created

I am attempting to create an alert when a new table is added to a lakehouse. I have created an eventstream from OneLake events, NewFileCreated and added an alert to send a Teams message when the even...
  • v-achippa's avatar
    v-achippa
    1 year ago

    Hi jmeisenh,

     

    Thank you for the response, please follow these steps:

    Go to the existing Eventstream, Make sure it is already connected to a OneLake data source and receiving NewFileCreated events. We need to extract the folder path from the full file path, this helps us group all files from the same table together.

    • Add a Derived Column to extract just the folder path from the full file path, this represents the table.
    • Add an Aggregate block, group by the folder path, add any simple aggregation just to trigger the alert. This will check for file events grouped by folder path in the preferred time period and we get only one event per table.
    • Connect this to your Teams alert block.

    So whenever a table is created, even if it creates more than 10 files, the Eventstream will send only one alert per table within the selected time window.

     

    Please refer these below documents for your reference:

    https://learn.microsoft.com/en-us/fabric/real-time-intelligence/event-streams/overview?tabs=enhancedcapabilities

    https://learn.microsoft.com/en-us/fabric/real-time-intelligence/tutorial-7-set-alert

    https://learn.microsoft.com/en-us/fabric/real-time-hub/set-alerts-data-streams

     

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

     

    Thanks and regards,

    Anjan Kumar Chippa