Hadoop - Error when saving Pig expression in Variable operator - mismatched input ',' expecting LEFT_PAREN

Hadoop - Error when saving Pig expression in Variable operator - mismatched input ',' expecting LEFT_PAREN

book

Article ID: KB0082676

calendar_today

Updated On:

Products Versions
Spotfire Data Science 6.x

Description

Error when saving Pig expression in Variable operator - mismatched input ',' expecting LEFT_PAREN

Issue/Introduction

Error when saving Pig expression in Variable operator - mismatched input ',' expecting LEFT_PAREN

Resolution

Error when saving Pig expression in Variable operator - mismatched input ',' expecting LEFT_PAREN

Problem

Variable operator configuration having this type of pig snippet to replace NULL values with 0:

(long) REPLACE (PAYMT_AMT ,'NULL','0')
is showing the following error message when trying to save the configuration (also, see the attached screenshot):
A syntax error was found in the following variables:
 
new:
mismatched input ',' expecting LEFT_PAREN
 
Do you wish to continue?

Cause

It's possible that one of the column names matches with a Pig reserved word (for example, EQ).

Resolution

Take a look at the data columns and rename the one that matches with a reserved Pig word.

Attachments

Hadoop - Error when saving Pig expression in Variable operator - mismatched input ',' expecting LEFT_PAREN get_app