Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.