Forum Discussion
Blank rows in Lakehouse
- 1 year ago
Hello lovishsood1 -
Can you please check the destination configuration in the dataflow gen2 and see if it is set to overwrite or append? If data is being appended and blank rows were already in the table, then they will still be present after future runs of the dataflow. Please also try writing the dataflow table to a new lakehouse table and then check it.
In order to apply a filter in the dataflow query that removes rows in which all columns are blank or null, you will need to add a step to your query with the following script, or add the step using the ribbon buttons, also shown as an option below. If using one of the scripts below, be sure to change YourPreviousStepNameHere to the actual name of your previous step.
Use this version if you are adding this step in the advanced editor or if you are adding this step in the formula bar and have View > Script > Query Script enabled:
#"Removed blank rows" = Table.SelectRows(YourPreviousStepNameHere, each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))Use this version if you are adding this step in the formula bar and have View > Script > Step Script enabled:
#"Removed blank rows" = Table.SelectRows(YourPreviousStepNameHere, each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))To add this step using the ribbon buttons, select the entire table and then choose Home > Remove Rows > Remove Blank Rows.
Please let me know if you have any questions about this. Thanks!
One thing you can do is add a filter in Dataflow Gen2.
In your Dataflow, add a Filter step before writing to the Lakehouse:
NOT (isNull(Column1) AND isNull(Column2) AND isNull(Column3))
Replace cloumns with the actual column names.
This will filter out any rows where all columns are null or blank.