简体   繁体   English

Azure 数据工厂将一个 CSV 文件拆分为多个 CSV 文件?

[英]Azure data factory to split a CSV file into multiple CSV files?

I have a file in Azure blob container as below,我在 Azure blob 容器中有一个文件,如下所示,

[Header 1]
123,abc,456,def,..
[Header 2]
789,XYZ, 101,PQR,..
567,DEF,675,GEF,..

I am expecting Azure data factory to convert it into multiple CSV files in blob container as below,我期待 Azure 数据工厂将其转换为 blob 容器中的多个 CSV 文件,如下所示,

CSV1 file:
    123,abc,456,def,..
CSV2 file:
    789,XYZ, 101,PQR,..
    567,DEF,675,GEF,..

The number of headers is known and always constant.标头的数量是已知的并且始终不变。 But the number of rows under each header can vary.但是每个 header 下的行数可以变化。

Please try this:请试试这个:

create a dataflow,add two source,create select and delete column you don't need,finally output to a single file.创建一个数据流,添加两个源,创建 select 并删除不需要的列,最后将 output 删除到单个文件中。

screenshot of dataflow:数据流截图: 在此处输入图像描述

setting of sink:水槽设置: 在此处输入图像描述

Hope this can help you.希望这可以帮到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM