Page 1 of 1

Caught parsing exception during wrapDescribeOperator():

Posted: Wed Jan 08, 2014 10:00 pm
by CA4T
Message Id = IIS-DSEE-TFOR-00165

My job is a very basic DB2 connector connecting to an open systems DB2 systems; running SQL contained within a file. The result of the SQL query is written to a sequential file.

Within the SQL, I am accessing data from a DB2 view. This view has column names that contain spaces so, therefore I need to put double quotes(") around the column names. The problem is I receive the following error:

Caught parsing exception during wrapDescribeOperator(): Expected identifier, got: Customer Name

Here is a snippet of the SQL:
SELECT "Customer Number"
,"Customer Name"
FROM SCHEMA01.MEMBER
WHERE "Customer Number" IN (00009 ,00007);

If I open the DB2 connector stage and hit the VIEW DATA button it brings the data back and everything looks good.

Here is a a snippet of the SQL that will work:
SELECT 'THIS IS A TEST'
FROM SCHEMA01.MEMBER
WHERE "Customer Number" IN (00009 ,00007);

I am leaning towards that the parser doesn't understand double quotes... but can't find anything on this...

Tried to use a / and a ' as escape characters- but did not work.

Posted: Thu Jan 09, 2014 9:26 am
by asorrell
I remember hitting something like this and after working on it for a while realizing it would be faster to just take 10 minutes and put in an alias (without the spaces) for each of the column names.

Did you try putting a backslash "\" in front of each of the double quotes?

Posted: Thu Jan 09, 2014 9:29 am
by CA4T
Got it to work!

Had to add the "as"...

SELECT "Customer Number" as custnum
, "Customer Name" as custname
FROM SCHEMA01.MEMBER;

Posted: Thu Jan 09, 2014 9:34 am
by asorrell
Oops, should have noticed that. Yes - the resulting column name has to match the DataStage column name, which doesn't support spaces.

Glad you found it.