When using the Dataflow g2 feature to ingest data into a Lakehouse or Warehouse (create a new table and ingest), it would be nice to have a UI to check and set "Allow nulls" for columns.
Dataflow g1 and the Power Query editor in the desktop environment, I didn't have much concern about this. However, in Dataflow g2, it is possible to specify ingest destinations and create new tables.
For example, the following query was defined using only GUI(Power Query online) operations.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMgKTYMIETJoqxcYCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed column type" = Table.TransformColumnTypes(Source, {{"Column1", Int64.Type}}),
#"Inserted addition" = Table.AddColumn(#"Changed column type", "Addition", each [Column1] + 0, Int64.Type)
in
#"Inserted addition"
This query will cause Data ingest to fail for the following reasons.
Mashup Exception Data Source Error, Error Details: Couldn't refresh the entity because of an issue with the mashup document MashupException.Error: DataSource.Error: Failed to insert a table. Details: Message = We can't insert null data into a non-nullable column.;Message.Format = We can't insert null data into a non-nullable column.
The next query, though, Data ingest succeeds as expected,
let
Source = Table.FromColumns(
{
{1,2,null,4,5}
},
type table [Column1 = nullable Int64.Type]
)
in
Source
The following query fails Data ingest.
let
Source = Table.FromColumns(
{
{1,2,null,4,5}
},
type table [Column1 = Int64.Type]
)
in
Source
So,
[Choose destination settings] - [Column mapping] - [Destination type]
[Power Query editor] - [Schema view]
It would be nice to be able to check or set "Allow nulls" in any of the GUIs.
---
いつもありがとう
Takeshi
4 Comments
- Bogdan_Lozyak2New Member
+1
I've come across the same issue, and I'm curious why the developers opted to create new tables in the Lakehouse and Warehouse with all columns set to NOT NULL. There are many situations in business where it's more beneficial to keep NULL values in numerical columns instead of filling them with zeros.
- fbcideas_migusrNew Member
What is the current workaround for this?
- nishalitNew MemberEarlier this month, we released an update that makes all dataflow output columns when loading to a new table allow nulls. If you're looking for more granular user controls for this behavior, please create a new idea that is more specific. The current fix should address all comments shared in this idea.
- fbcideas_migusrNew MemberStatus added:Completed
Recent ideas
Allow us to rename fabric data agents published to m365
If we use deployment pipelines to promote fabric data agents between dev, test/UAT, and prod fabric workspaces, we need to keep the name of the fabric agent the same in each workspace. If we want to ...PeterDaniels5 hours agoAdvocate IIINew183Views0likes2CommentsMake workspace and item session persistence optional
Description The new persistent session behavior in Microsoft Fabric should be optional rather than forced. Currently, Fabric remembers the workspaces and items that were open in my previous session...TeemuMultanen7 hours agoAdvocate INew294Views47likes2CommentsSupport Encrypted Sensitivity-Labeled Excel Files in Power Query
Description Currently, Power Query Online and Power Query in Excel are unable to access encrypted Excel files. Excel files with sensitivity types other than Public or Non-Business can be encrypted a...ewarstdhyjugkhi7 hours agoMicrosoft EmployeeNew22Views6likes0Comments