在U-SQL中将数据附加到现有文件中 [英] Append data in existing file in U-SQL
问题描述
我们可以在U-SQL的现有文件中追加数据吗?我已经在U-SQL中创建了一个CSV文件作为输出.我正在编写另一个U-SQL查询,我想将该查询的输出附加到现有文件中.有可能吗?
Can we append data in existing file in U-SQL? I have created a CSV file as output in U-SQL. I am writing another U-SQL query and I want to append the output of that query in the existing file. Is it possible?
推荐答案
不支持它,并且与健壮,分布式,幂等大数据系统的设计背道而驰(尽管您可以通过读取先前的输出来实现该行为:行集并执行UNION ALL.
It's not supported, and would go against the design of a robust, distributed, idempotent big data system (although you could implement that behaviour by reading the previous output as a rowset and do UNION ALL).
处理此问题的最佳方法是正确使用分区,例如,为每个执行创建一个或多个新分区:
The best way to deal with this is to use partitions properly, for example, create one or more new partitions for each of your executions: https://msdn.microsoft.com/en-us/library/azure/mt621324.aspx
这篇关于在U-SQL中将数据附加到现有文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!