Page 1 of 1

Substring function in 7.5

Posted: Mon Jan 31, 2005 2:25 pm
by ds_is_fun
What should I use for the Substring function which doesnt seem to exist in 7.5 . Thanks!

Posted: Mon Jan 31, 2005 3:51 pm
by ray.wurlod
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.

Posted: Tue Feb 01, 2005 5:46 am
by Eric
I think SubStrings is a Server Function and not a Parallel function.

Posted: Tue Feb 01, 2005 7:16 am
by roy
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,

Posted: Tue Feb 01, 2005 2:09 pm
by T42
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 [,])

Posted: Tue Feb 01, 2005 8:55 pm
by vmcburney
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.

Posted: Wed Feb 02, 2005 8:47 am
by roy
So the real question is where do we get the proper docs? :(

Posted: Wed Feb 02, 2005 5:46 pm
by T42
Ask Ascential Support for a copy of the Orchestrate documents.

Posted: Wed Feb 02, 2005 5:53 pm
by T42
vmcburney wrote:If you were only using your transformer from null handling, trims and substrings then the modify stage should be a lot faster.
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.

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.

Posted: Wed Feb 02, 2005 5:57 pm
by s1kaasam
Hi
Yes the substring function exists in 7.5 but the only difference is is syntax.As said earlier in one of the replies to the question the syntax is

ColName[starting character,No. of positions]

This would take care of substringing in the transformer stage for sure.