Forum Discussion
Gen2 Dataflow Started Failing - Nullable Issue
I may have worked out what the issue is and have come up with a shoddy workaround.
It appears to be a data typing issue. Until recently, Fabric was weakly typed. If you are pulling in data from a data source, M Query seems to use its own data types e.g. number, which is not null unless specifically declared otherwise e.g.
type nullable number
But to write a number to an integer field (which id fields often are) requires that the data is converted appropriately e.g. Int64.Type. The kicker here is that Int64.Type *is* nullable, and so cannot be written to a not null field.
My workaround is to change integer not null fields to decimal(10,0) not null. Has anybody got anything better?
I've figured out the solution that lets you keep your destination table's field as INT NOT NULL.
1. In the Power Query editor, set the data type to Int64.Type
2. Select Transform > Mark as key
3. Change the last parameter from false to true
- PeterLinnet1 year agoRegular Visitor
Thanks for that suggestion. Do you also have a workaround for VARCHAR(??) NOT NULL fields?
- Anonymous1 year agoNot applicable
I don't seem to be getting the same issue in this case. What error are you seeing when you try to run the dataflow? Have you tried the steps listed by Anonymous in their last reply?
- mcwires1 year agoFrequent Visitor
I don't see this option in Fabric. For future reference can you explain where it is please? This is what I can see:
Thanks.
- Anonymous1 year agoNot applicable
It is in the Transform ribbon (not the shortcut in the Home ribbon):