Page 1 of 1

Empty line as constraint in transformer

Posted: Tue Feb 14, 2012 4:37 am
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

Posted: Tue Feb 14, 2012 4:45 am
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?

Posted: Tue Feb 14, 2012 4:59 am
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.

Posted: Tue Feb 14, 2012 5:05 am
by HendrikB
Ok,
what source are you talking about? DB, Flat file?
What is the datatype of your input column? CHAR, VARCHAR?

Posted: Tue Feb 14, 2012 5:53 am
by chetan.c
Sorry actually len() works but my logic in stage variables was wrong, fixed it thanks.

Posted: Tue Feb 14, 2012 6:03 am
by pandeesh
But, i prefer these things in doing filter option of sequential stage..