Substring function in 7.5
Moderators: chulett, rschirm, roy
Substring function in 7.5
What should I use for the Substring function which doesnt seem to exist in 7.5 . Thanks!
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I would be very surprised if what you claim is true. Substring is one of the most fundamental functions in ETL data processing.
What evidence do you have for your assertion?
Unfortunately I can not check, as I am currently working on a 7.1 site.
What evidence do you have for your assertion?
Unfortunately I can not check, as I am currently working on a 7.1 site.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi,
Sub-Strings in DS are achieved by [startpos,length] i.e: link.col[1,4]
it is the same in a server transformer and in a parallel transformer.
(and yes I've just checked it on 7.5 - just for fun )
IHTH,
Sub-Strings in DS are achieved by [startpos,length] i.e: link.col[1,4]
it is the same in a server transformer and in a parallel transformer.
(and yes I've just checked it on 7.5 - just for fun )
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
You can also do a left(), right(), and nested version of both, blah blah blah...
If you're looking for substr(), you will fail in your search. Broaden your mind and your document-reading prowness. (See parjdev.pdf, "Functions" chapter, scroll down to "String" section. Unfortunately, no mentions are made of [,])
If you're looking for substr(), you will fail in your search. Broaden your mind and your document-reading prowness. (See parjdev.pdf, "Functions" chapter, scroll down to "String" section. Unfortunately, no mentions are made of [,])
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
There is no specific substring function for a transformer (other then square brackets) however there is one for the modify stage:
specification
out_field1 = substring[4, 6]in_field1
If you were only using your transformer from null handling, trims and substrings then the modify stage should be a lot faster.
The guide doesn't come out and tell you that string[n, n] is the way to do substrings in transformer stages, and it doesn't explain why the functions in the transformer stage are different to those in the modify stage and it doesn't have a full list of available functions.
specification
out_field1 = substring[4, 6]in_field1
If you were only using your transformer from null handling, trims and substrings then the modify stage should be a lot faster.
The guide doesn't come out and tell you that string[n, n] is the way to do substrings in transformer stages, and it doesn't explain why the functions in the transformer stage are different to those in the modify stage and it doesn't have a full list of available functions.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
So the real question is where do we get the proper docs?
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
That is incorrect. All versions from 7.0.1 and above have vastly improved Transformer's runtime performance to a point where it is much faster than Modify, Filter, and other equivalent stages. It is now a matter of performance between compiled code and intepreted code.vmcburney wrote:If you were only using your transformer from null handling, trims and substrings then the modify stage should be a lot faster.
Of course, the comple time is slower, especially if your compiler only have a 1 user license (only 1 transformer compile at a time...) Performance for development is so much better if you have 2-5 user license for your compiler alone.