删除CSV文件中的空行 [英] Remove null rows in CSV file

查看:292
本文介绍了删除CSV文件中的空行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team,


我正在从CSV文件复制数据,它被放置在共享路径中并转移到Blob。然后我将数据从blob移动到SQL表。


当我们将数据从blob加载到SQL时,有一些空记录被加载到表中。我想在使用ADF V2加载到Blob或SQL表之前删除这些空行。


是否有删除空行的选项。



谢谢,


MG

解决方案

嗨MG_ADF,


由于您的源是Blob存储,您可以使用自定义活动在复制之前转换数据。要阅读有关自定义活动的更多信息,请按以下文档操作:


https://docs.microsoft.com/en-us/azure/data-factory/transform-data-using-dotnet -custom-activity


如果源是Azure SQL DB,您可以使用存储过程转换数据(https://docs.microsoft.com/en-us/azure/ data-factory / transform-data-using-stored-procedure)


如果它是Azure Data Lake商店,你可以运行一个U-SQL活动来转换它(https:// docs.microsoft.com/en-us/azure/data-factory/transform-data-using-data-lake-analytics)


希望这会有所帮助。


Hi Team,

I'm copying data from CSV file and it is placed in Shared Path and moving to Blob. Then I'm moving data from blob to SQL table.

When we are loading data from blob to SQL there are some empty records loaded into table. I want to remove these empty rows before loading into Blob or SQL table by using ADF V2.

Is there any option to remove the empty rows.

Thanks,

MG

解决方案

Hi MG_ADF,

Since your source is Blob Storage, you can transform the data before copying by using a custom activity. To read more about custom activities, please follow this doc :

https://docs.microsoft.com/en-us/azure/data-factory/transform-data-using-dotnet-custom-activity

Had the source been Azure SQL DB, you could have transformed the data using a Stored Procedure (https://docs.microsoft.com/en-us/azure/data-factory/transform-data-using-stored-procedure)

Had it been Azure Data Lake store, you could have run a U-SQL activity to transform it(https://docs.microsoft.com/en-us/azure/data-factory/transform-data-using-data-lake-analytics)

Hope this helps.


这篇关于删除CSV文件中的空行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆