2017-08-09 58 views

回答

0

当使用MsConcat没有办法跳过标题行。 MsConcat在文件级别运行,没有“行”的概念。它只是在字节级连接文件的内容。

行概念只有在文件内容被解释为类似U-SQL或Scala的情况下才会出现。因此,您可以找到构造跳过那里的标题行。

+0

这就是我的想法too.Thanks你的帮助。 –

0

从U-SQL的角度阐述Amit的回答:内置的Extractors.Csv()提供了跳过前导行的选项,输出者可以添加新的标题行。如果你的数据格式对应于这个,这里是一个伪代码示例:

@data = EXTRACT a int, b string // ... or whatever your CSV schema is 
     FROM "/filestobeconcatenated/{*}" // provide the file set to the files you want to concat 
     USING Extractors.Csv(skipFirstNRows:1); // skip header row. Maybe add other parameters 

OUTPUT @data 
TO "/concatenated.csv" 
USING Outputters.Csv(outputHeader:true); 
相关问题