Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
Could someone on the Microsoft side confirm what’s going on in a certain hard to catch error scenario?
For both of the below examples:
Why doesn’t “try Data” catch this error?
My guess as to what’s going on:
Is this anywhere close to correct? 🙂
Thank you,
Ben
let
Data = Table.View(null,[GetType = () => type table [ABC=any], GetRows = () => error "bad"])
in
Data // an error is displayed in Query Editor
// try Data // record's HasError = false but if its field Value is accessed, an error is displayed
// Data is table // returns true
// Table.Schema(Data) // returns schema table
let
Source = Table.FromList({error "bad"}, Splitter.SplitByNothing(), {"Column1"}),
Data = Table.ExpandTableColumn(Source, "Column1", {"abc"})
in
Data // an error is displayed in Query Editor
// try Data // record's HasError = false but if its field Value is accessed, an error is displayed
// Data is table // returns true
// Table.Schema(Data) // returns schema table
Solved! Go to Solution.
Simply referencing the value apparently doesn't raise an error. But enumerating the rows does.
What happens if you do this?
try Table.Buffer(Data)
This should force the enumeration of the rows.
EDIT: Note that there may be other less-expensive ways to initiate enumeration. Buffering is just the first thing that came to mind.
Thanks, @Ehren.
For triggering the enumeration with minimum expense, I'm attracted to "Data{0}?", based on the thought that it has the advantage of only pulling at most one row—just enough to cause the error to be raised.
Simply referencing the value apparently doesn't raise an error. But enumerating the rows does.
What happens if you do this?
try Table.Buffer(Data)
This should force the enumeration of the rows.
EDIT: Note that there may be other less-expensive ways to initiate enumeration. Buffering is just the first thing that came to mind.
Thanks, @Ehren.
For triggering the enumeration with minimum expense, I'm attracted to "Data{0}?", based on the thought that it has the advantage of only pulling at most one row—just enough to cause the error to be raised.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
13 | |
12 | |
12 | |
12 |