如何动态生成并输出多个文件在ECL中?

huangapple go评论99阅读模式
英文:

How can I dynamically generate and output multiple files in ECL?

问题

以下是翻译好的部分:

让我们假设我们想要动态创建包含一些数据的多个文件。如何实现这一目标?

例如,我尝试了以下方法,以动态生成多个文件并输出一些数据:

file_names := DATASET([{ 'file_1' }, { 'file_2' }], { STRING name });
ds := DATASET([{ 'a' }], { STRING val });
APPLY(file_names, OUTPUT(ds,, name, THOR));

但我收到了以下错误:

如何动态生成并输出多个文件在ECL中?

英文:

Let's say we want to dynamically create multiple files containing some data. How can that be achieved?

I tried the following for example, to output some data in multiple files on the fly:

file_names := DATASET([{'file_1'}, {'file_2'}], {STRING name});
ds := DATASET([{'a'}], {STRING val});
APPLY(file_names, OUTPUT(ds,, name, THOR));

But I got the following error:

如何动态生成并输出多个文件在ECL中?

答案1

得分: 1

This exact issue was reported in this JIRA ticket: JIRA HPCC-14754 which so far has not been resolved.

HTH,

Richard

英文:

This exact issue was reported in this JIRA ticket: JIRA HPCC-14754 which so far has not been resolved.

HTH,

Richard

答案2

得分: 0

As Richard stated above, this is a known issue and has been reported. However, you can generate multiple outputs using the code you posted but you need to change your ECL cluster target to "hthor" instead of "thor". Of course, for large files this could be problematic, but I think your use case for small records and multiple files would work for you.

英文:

As Richard stated above, this is a known issue and has been reported. However, you can generate multiple outputs using the code you posted but you need to change your ECL cluster target to "hthor" instead of "thor". Of course, for large files this could be problematic, but I think your use case for small records and multiple files would work for you.

Bob

huangapple
  • 本文由 发表于 2023年5月25日 22:25:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/76333374.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定