英文:
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));
但我收到了以下错误:
英文:
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:
答案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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论