Forum Discussion
mpjtaylor
5 years agoAdvocate I
Dataflow - How can I stop automatic steps being added
I have a Datalake with multiple folders with lots of blobs that are JSON files each folder has different json structures and some are lists and others are records. I am trying to use a single dataflo...
SMHolck
4 years agoAdvocate IV
I may have found a way around the one that shows a fX (function) symbol and says "Remove Columns" ...
Table.RemoveColumns(#"Previous step name", Table.ColumnsOfType(#"Removed columns 1", {type table, type record, type list, type nullable binary, type binary, type function}))
The PowerQuery editor for Dataflows seems to be adding this in an attempt to get rid of columns where every current value is null. However, I want it to retain the column because I am writing the code ahead of the data - as in the system doesn't yet have values in it yet, but will in the future.
Try explicitly setting the type of the columns that you want to keep. My best guess is that it was implicitly converting my column to the nullable binary. But by explicitly setting the type in the previous step, it finally kept my column. It was a little funky in my case because that column was explicitly set in the original query which was merged with my final table, so not sure why I had to tell PowerQuery the column type twice.
The PowerQuery editor for Dataflows seems to be adding this in an attempt to get rid of columns where every current value is null. However, I want it to retain the column because I am writing the code ahead of the data - as in the system doesn't yet have values in it yet, but will in the future.
Try explicitly setting the type of the columns that you want to keep. My best guess is that it was implicitly converting my column to the nullable binary. But by explicitly setting the type in the previous step, it finally kept my column. It was a little funky in my case because that column was explicitly set in the original query which was merged with my final table, so not sure why I had to tell PowerQuery the column type twice.
Anonymous
4 years agoNot applicable
This worked for me! thanks 🙂