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
-
chetan.c
- Participant
- Posts: 112
- Joined: Tue Jan 17, 2012 2:09 am
- Location: Bangalore
Post
by chetan.c »
Hi,
I have data like this.
Col1
a
b
c
"Empty line"
d
e
f
My output should be
abc
def
I'm using stage variables to concatenate the rows.
But how to mention the constraint in Transformer as blank line?
I tried trim(col1)='' but it is not working.
Thanks
Chetan
-
HendrikB
- Premium Member
- Posts: 15
- Joined: Tue Feb 07, 2012 6:01 am
Post
by HendrikB »
Hi,
just an idea: maybe could you identify an empty line by its length using length function len().
And what does empty line mean?
Number of Blanks? NULL?
-
chetan.c
- Participant
- Posts: 112
- Joined: Tue Jan 17, 2012 2:09 am
- Location: Bangalore
Post
by chetan.c »
Hi,
I tried len() but its not working either.
Empty line is just a blank line not any number of spaces or blanks.
Like
a
b
Thanks.
-
HendrikB
- Premium Member
- Posts: 15
- Joined: Tue Feb 07, 2012 6:01 am
Post
by HendrikB »
Ok,
what source are you talking about? DB, Flat file?
What is the datatype of your input column? CHAR, VARCHAR?
-
chetan.c
- Participant
- Posts: 112
- Joined: Tue Jan 17, 2012 2:09 am
- Location: Bangalore
Post
by chetan.c »
Sorry actually len() works but my logic in stage variables was wrong, fixed it thanks.
-
pandeesh
- Premium Member
- Posts: 1399
- Joined: Sun Oct 24, 2010 5:15 am
- Location: CHENNAI, TAMIL NADU
Post
by pandeesh »
But, i prefer these things in doing filter option of sequential stage..
pandeeswaran