web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Platform Dataflo...
Power Apps
Answered

Power Platform Dataflow Error Handling

(3) ShareShare
ReportReport
Posted on by 21
We have been using Power Platform dataflows to bring data from Snowflake into Dataverse tables. Recently, we had an issue where the dataflow thought the query returned zero rows. Since our dataflow was set up to delete any rows that did not exist in the query, all of our data was deleted for this table and the relationships with several other tables were broken. The next time the dataflow ran, it repopulated the table because the query returned data.

Since this has only happened the one time, I do not believe this was an issue on the Snowflake side. Instead, I suspect that the dataflow couldn't connect to Snowflake for some reason, and instead of handling that as an error, it handled it as returning zero rows.

Can anyone confirm that if a connection cannot be made within a dataflow, it throws an error instead of proceeding as though it returned zero rows?

We'd love to be able to use this functionality as it was intended, but right now, it's just too risky and would cause too much disruption if this issue happened again.
I have the same question (0)
  • abc 123 Profile Picture
    784 Moderator on at
    There's plenty of error handling functions that you could try and catch the error message. Look for things like 400, 402, 429, etc.
     
     
    UpdateContext({strErrMsg: "None"});
    IfError(
      ClearCollect(Filter(...whatever));
      , 
      //Had an error
      UpdateContext({strErrMsg: FirstError.Message});  
    );
    If(strErrMsg = "None",
      //Do stuff
     ,
     //Display Error Message
     Notify(strErrMsg);
    )
     
    You'll have to embellish this to check for the internet error codes (200, 400, 403, 429, etc), but hopefully you get the gist. 
  • Verified answer
    bspang Profile Picture
    21 on at
    Thanks abc, but I was looking more for code in the dataflow itself, not within Power Apps. 
     
    One of our data engineers was able to find some Power Query code that worked: 
    let 
    
      Source = DatabaseInfo /* Replace with your actual connection */
    
      /* Any intermediary transformation steps go here */
    
      RecordCount = Table.RowCount(#"My Table"),
    
      Results = if RecordCount = 0 then error "No records found" else #"My Table"
    
    in
    
      Results

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard