在pig中迭代2个数据源

sg24os4d  于 2021-05-31  发布在  Hadoop
关注(0)|答案(0)|浏览(185)

我有2个数据源1)params.txt,它有以下内容

item1
item2
item2
.
.
.
itemN

2) data.txt,其中包含以下内容

he names (aliases) of relations A, B, and C are case sensitive.
The names (aliases) of fields f1, f2, and f3 are case sensitive.
Function names PigStorage and COUNT are case sensitive.
Keywords LOAD, USING, AS, GROUP, BY, FOREACH, GENERAT
and DUMP are case insensitive. They can also be written

任务是查看param文件的n项中的每一项是否存在于数据文件的每一行中。这是相同的伪代码

FOREACH d IN data:
    FOREACH PARAM IN PARAMS:
          IF PARAM IN d:
                  GENERATE PARAM,1

在Pig的脚本中是否有这种可能,如果有,请你给我指一下那个方向。
谢谢

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题