very simple:null represented as double quoted empty string

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ariear
Participant
Posts: 237
Joined: Thu Dec 26, 2002 2:19 pm

very simple:null represented as double quoted empty string

Post by ariear »

Hi,

I need to read a sequential file in it simple format i.e. comma delimited, double qouted format. Nulls are represented as double quoted empty strings i.e. "".

Thanks for your help !
bigpoppa
Participant
Posts: 190
Joined: Fri Feb 28, 2003 11:39 am

very simple:null represented as double quoted empty string

Post by bigpoppa »

What is the problem you are having? Does PX not recognize the "" as a NULL?
ariear
Participant
Posts: 237
Joined: Thu Dec 26, 2002 2:19 pm

Post by ariear »

I'm trying to read a simple sequential file (comma delimited & double quoted). A null will be represented in this file as "". i.e.
"a","b","","c","d"

It seems that px cannot deal with a nullable field that has no real replacement char or I don't know how to deal with px. :oops:

ArieAR
jreddy
Premium Member
Premium Member
Posts: 202
Joined: Tue Feb 03, 2004 5:09 pm

Post by jreddy »

did u specify the QUOTE property on the sequential file stage as 'double'. This tells it that the column will have leading and trailing double quotes.

Try this, write a simple test job with source sequential stage to read this input, and define the quote property as double. Use a transformer to directly map these columns to another sequential file stage. But on the target sequential stage, set the QUOTE property to 'none'. When u run the job, if u see the contents of the target file, u will see that it set that column with "" as null.

for example, if your source was reading a record
"a","b","","c","d"
the output file would have had this as
a,b,,c,d

hope this helps
Post Reply