You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@datafu.apache.org by "Russell Jurney (JIRA)" <ji...@apache.org> on 2014/10/02 18:20:33 UTC
[jira] [Updated] (DATAFU-69) Create SelectFieldByName UDF - which,
given a field who's value contains a field name, and *, returns the value
of the field referenced by the field name
[ https://issues.apache.org/jira/browse/DATAFU-69?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Russell Jurney updated DATAFU-69:
---------------------------------
Description:
define SelectFieldByName datafu.pig.util.SelectFieldByName();
data = LOAD 'input' using PigStorage(',') AS (fieldName:chararray, text1:chararray, text2:chararray, text3:chararray);
data2 = FOREACH data GENERATE fieldName, SelectFieldByName(fieldName,*) as result;
data3 = FOREACH data2 GENERATE fieldName, result;
STORE data3 INTO 'output';
was:
define ChooseFieldByValue datafu.pig.util.ChooseFieldByValue();
data = LOAD 'input' using PigStorage(',') AS (fieldName:chararray, text1:chararray, text2:chararray, text3:chararray);
data2 = FOREACH data GENERATE fieldName, ChooseFieldByValue(fieldName,*) as result;
data3 = FOREACH data2 GENERATE fieldName, result;
STORE data3 INTO 'output';
Summary: Create SelectFieldByName UDF - which, given a field who's value contains a field name, and *, returns the value of the field referenced by the field name (was: Create ChooseFieldByValue UDF - which, given a field who's value contains a field name, and *, returns the value of the field referenced by the field name)
> Create SelectFieldByName UDF - which, given a field who's value contains a field name, and *, returns the value of the field referenced by the field name
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DATAFU-69
> URL: https://issues.apache.org/jira/browse/DATAFU-69
> Project: DataFu
> Issue Type: Bug
> Affects Versions: 1.3.0
> Reporter: Russell Jurney
> Labels: features
> Attachments: DATAFU-69.patch, DATAFU-69.patch
>
>
> define SelectFieldByName datafu.pig.util.SelectFieldByName();
> data = LOAD 'input' using PigStorage(',') AS (fieldName:chararray, text1:chararray, text2:chararray, text3:chararray);
> data2 = FOREACH data GENERATE fieldName, SelectFieldByName(fieldName,*) as result;
> data3 = FOREACH data2 GENERATE fieldName, result;
> STORE data3 INTO 'output';
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)