私は以下のテキストファイルを入力し、ロジックに基づいて別のファイルに出力を生成する必要があります。PIGの条件文
customerid|Dateofsubscription|Customercode|CustomerType|CustomerText
1001|2017-05-23|455|CODE|SPRINT56
1001|2017-05-23|455|DESC|Unlimited Plan
1001|2017-05-23|455|DATE|2017-05-05
1002|2017-05-24|455|CODE|SPRINT56
1002|2017-05-24|455|DESC|Unlimited Plan
1002|2017-05-24|455|DATE|2017-05-06
ロジック:
If Customercode = 455
if(CustomerType = "CODE")
Val= CustomerText
if(CustomerType = "DESC")
Description = CustomerText
if(CustomerType = "DATE")
Date = CustomerText
出力:
は、ここに私の入力ファイルです
あなたはこれで私を助けてくださいでした。
ありがとう – satya