Substring in Filter

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
kittu.raja
Premium Member
Premium Member
Posts: 175
Joined: Tue Oct 14, 2008 1:48 pm

Substring in Filter

Post by kittu.raja »

Hi Everyone,

Can we use substring function in a filter.
Like in transformer column_name[1,6] = 7777

Can we do the same in a filter? If yes what is the syntax

Thanks in advance.
Rajesh Kumar
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I do not think that is possible in a filter stage. The filter stage only filters records, unmodified.
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 »

One task, one stage.

The Filter stage filters.

If you need substring perform that in an upstream Modify or Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
devo
Premium Member
Premium Member
Posts: 18
Joined: Fri Sep 22, 2006 1:22 pm

Post by devo »

Is it possible to then do something like a SQL "LIKE" command?
Grant Dever
Programmer Analyst Sr
mobashshar
Participant
Posts: 91
Joined: Wed Apr 20, 2005 7:59 pm
Location: U.S.

Post by mobashshar »

Yes.. you can use LIKE condition in Filter
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

The filter option is calling an external command/script/program on the operating system. Therefore, you have whatever functionality is provided within that command/script/program.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think they're talking about the Filter stage, James. :wink:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

Well I'll be darned...how'd I miss THAT? :oops:
- james wiles


All generalizations are false, including this one - Mark Twain.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

I'm not seeing where it says stage vs. seq. file option. vs. coffee, etc.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply