Filter stage "where clause" format

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
ady
Premium Member
Premium Member
Posts: 189
Joined: Thu Oct 12, 2006 12:08 am

Filter stage "where clause" format

Post by ady »

Hi,

One of my job uses a transformer to apply the constraint l_INVENT.DIGIT_CODE[1,2] = "04" And l_INVENT.KIT_ID <> "00000".

I am trying to replace the transformer with a filter stage, How do I specify the above constraint in the filter stage?

I tried DIGIT_CODE like "04...", it dosent seem to work. Please let me know how I can do this in a filter stage.

Thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Code: Select all

DIGIT_CODE like "04%" 
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ady
Premium Member
Premium Member
Posts: 189
Joined: Thu Oct 12, 2006 12:08 am

Post by ady »

Thanks DSguru,

Can I specify "And" in the clause?

like DIGIT_CODE like "04%" And l_INVENT.KIT_ID like "~00000"

and can I use <> or = in the filter stage?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You can provide multiple filters. Try it. You can play with it and come up with your results. Play and learn :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ady
Premium Member
Premium Member
Posts: 189
Joined: Thu Oct 12, 2006 12:08 am

Post by ady »

My job structure is


Seq stage >
Seq stage > Funnel > Filter > Seq Stage


The job was working fine when I had transformer in the place of the filter, but When I use a filter there, the job dosent work. The director shows the job ran sucessfully in 0.2 seconds, there are no warnings.

DS dosent show any activity of rows from any of the stages, The where clause in the filter stage is DIGIT_CODE like "04%". The output link label number is "0" which correspond to output link.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I dont know how the filter will work for numeric data. Try a test job in which you change the integer to string and then put the filter option on the string. See if that works without a hitch.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ady
Premium Member
Premium Member
Posts: 189
Joined: Thu Oct 12, 2006 12:08 am

Post by ady »

The data comes as char from the source ... anyway i will try converting to string again and see if it works ..
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

No you dont need to if it comes in as char. I was under the impression that it was in integer format.
Lets take a step back. How many filter where clauses do you have. Start with one, see if that works. Add on more conditions later.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

beaditya wrote:My job structure is
DS dosent show any activity of rows from any of the stages, The where clause in the filter stage is DIGIT_CODE like "04%". The output link label number is "0" which correspond to output link.
Have you tested your output from funnel stage. If there is an issue with filter than atleast you will see some activity around funnel stage links.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
Post Reply