Filter Stage usage for LIKE %ABC%

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
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Filter Stage usage for LIKE %ABC%

Post by Titto »

hello,

Can the filter stage used to filter the data where LIKE %ABC% - same as we provide in SQL?

if not, what could be the alternative to use the LIKE condition to use %ABC%.

Any info helpful and appreciated.

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

Post by DSguru2B »

It supports 'Like' boolean operator. Did you try using it?
For your example, it will be Col like '%ABC%'
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The Filter stage is a strange hybrid. With LIKE it expects regular expressions rather than SQL wildcards. Therefore what you need is

Code: Select all

LIKE '*ABC*'
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

It works with sql wild cards as well right? Where is this information documented? I checked the Parallel developers guide, its not there. Unless its in a chapter other than Filter Stage.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Manuals from IBM training classes and Orchestrate Operators manual page 7-8.

The latter lists all the recognized regular expression characters and "%" is not among them.

IBM Center of Excellence claims that the Transformer stage is now faster than the Filter stage because the latter is interpreted; take this advice with skepticism until you test it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Thats strange. I built a job and after testing with '%' , I confirmed that it can be used. I dont have access to the manual so cannot test with other operators, but know for sure '%' works.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

But If I recall properly, once I did testing on '*' in filter, which didn't gave your the expected output. I posted the result in this forum as well in some of the post. But I dont have access to test now.
But Iam sure that, its works with patter matching. Like [a-z][a-h]...
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

DSguru2B is right. '%' is working, contradictorily '*' is not working.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

kumar_s wrote:DSguru2B is right. '%' is working, contradictorily '*' is not working.
Thanks for the confirmations Kumar. And I thought my system had a bug :roll:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply