Creating a dynamic URL based data from a database table

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
GSIDSXGrp
Premium Member
Premium Member
Posts: 19
Joined: Tue Jul 31, 2007 2:25 pm

Creating a dynamic URL based data from a database table

Post by GSIDSXGrp »

Hello All,

Using DataStage 8x, I'm creating a job that extracts image information from an Oracle database and creates a XML file. Part of the information is a URL to the image location. When executed the Job needs to determine if image caching is enabled and the base part of URL.
Example:

Code: Select all

If caching is ON the image base is http://cache.image.net.  
If caching is OFF the image base is http://someplace.net.
Every image gets the same URL base for that job run.

I've crafted SQL to determine the URL base. What I can't figure out is how to get the string (URL base) into the flow to concatenate with the image name.

The data job flow is an Oracle Enterprise Stage -> XML Out Stage -> Sequential File Stage (for testing)
(the XML Out is Nested Chunk)

I've attempted to create a Sequence Job and using a transformation stage "save" the image base as a job parameter. I've attempted to add a transformation stage in the data flow however I can't determine how to get the string into the stage (from the Oracle Enterprise Stage), the transformation stage only allows input and no reference.

I could fool the process and make the image base stage include a key column for joining to the data however that seems like a waste when every record needs the same value.

How can I handle creating the dynamic URL?

I'm new to DataStage and DSXchange so I hope I've included enough details and selected the correct form to post the question.

Thank you,
T
Post Reply