删除 Azure 数据工厂数据流转换中的空行
Delete null rows in azure data factory data flow transformation
我在 Azure 数据工厂中创建了数据流转换
Source : Excel 文件上传到 Azure Blob
目标:JSON在 Azure Blob 中创建的文件
- 我不想将空行从源插入到目标
- 如果特定行没有特定值,那么我想从前面的行中插入值。
如果所有列都具有空值,我已尝试过滤转换以使用以下表达式过滤掉行,但它无法删除空行
!(isNull(Column_1)) && !(isNull(Column_2)) && !(isNull(Column_3)) && !(isNull(Column_4 )) && !(isNull(Column_5)) && !(isNull(Column_6))
在过滤器中使用 columns() 函数从每行的所有列中获取值。将其放入 array() 中,然后使用 contains() 搜索数组中是否存在值(即不为空)。请注意,您必须将数组元素合并为字符串:
包含(数组(toString(列())),!isNull(#item))
将其放入您的过滤器表达式中,应该会起作用。
我使用过滤器转换并根据条件提供以下过滤器
!(isNull(Prop_0))||!(isNull(Prop_1))||!(isNull(Prop_2))||!(isNull(Prop_3))||!(isNull(Prop_4))||!(isNull(Prop_5))||!(isNull(Prop_6))||!(isNull( Prop_7))||!(isNull(Prop_8))||!(isNull(Prop_9))||!(isNull(Prop_10))
我在 Azure 数据工厂中创建了数据流转换
Source : Excel 文件上传到 Azure Blob 目标:JSON在 Azure Blob 中创建的文件
- 我不想将空行从源插入到目标
- 如果特定行没有特定值,那么我想从前面的行中插入值。
如果所有列都具有空值,我已尝试过滤转换以使用以下表达式过滤掉行,但它无法删除空行
!(isNull(Column_1)) && !(isNull(Column_2)) && !(isNull(Column_3)) && !(isNull(Column_4 )) && !(isNull(Column_5)) && !(isNull(Column_6))
在过滤器中使用 columns() 函数从每行的所有列中获取值。将其放入 array() 中,然后使用 contains() 搜索数组中是否存在值(即不为空)。请注意,您必须将数组元素合并为字符串:
包含(数组(toString(列())),!isNull(#item))
将其放入您的过滤器表达式中,应该会起作用。
我使用过滤器转换并根据条件提供以下过滤器
!(isNull(Prop_0))||!(isNull(Prop_1))||!(isNull(Prop_2))||!(isNull(Prop_3))||!(isNull(Prop_4))||!(isNull(Prop_5))||!(isNull(Prop_6))||!(isNull( Prop_7))||!(isNull(Prop_8))||!(isNull(Prop_9))||!(isNull(Prop_10))