Page 1 of 1

Creating a dynamic URL based data from a database table

Posted: Mon Sep 15, 2008 10:46 am
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