data services xml customization

hi all

i’m trying to customize a template job exported to xml by replacing the sources and targets from the xml. this will help me programmatically create a number of jobs from a single template.

However, each object in the xml like dataflow, workflow, sources, targets etc in the XML have a unique id called GUID which i cannot interpret and hence not replace. does anyone have an idea on when this GUID is created, how it is created and is there a way it can be referenced from somewhere?

Many thanks for all your inputs.

-nam


namithc (BOB member since 2011-07-07)

Well. GUID is a very unique number which gets generated each time an object is created
This ID (if I am correct) will not be the same even when you import the job from a REPOSITORY A to REPOSITORY B.
There is no way to interpret this ID

If you would like to find the ID, then it will be in AL_LANG repository table and even some other tables for Database objects.

It would be harmful in a way you even corrupt the repository by this approach.


ganeshxp :us: (BOB member since 2008-07-17)

Hi,

Ideally you don’t want to build multiple jobs by copying a ‘template’ but instead look at trying to reuse common code between the jobs. This is mainly because if you find your template has a defect or needs an enhancement then you’ll need to update all your jobs that are using the template rather than just updating the one routine.

Look at using custom functions to encapsulate your processing. Scripts can be reused between jobs by embedding them within workflows and then reuse those workflows between jobs. Also using variables and parameters in workflows and dataflows helps to eliminate dependencies between parts of your job and makes the workflows and datflows themselves more reusable.

Just something to think about rather than copying code across jobs :slight_smile:

regards

AL


agulland :uk: (BOB member since 2004-03-17)

Hi Al, Ganesh

Thanks for your reponses. The issue is now fixed

Ganesh, I found that the error was not with the GUID. It was with some other parameter. When i fixed the other parameter, the al_engine imported the new job xml with a new GUID.

Al, Yes. we can use reusable components across different jobs. however, my idea was a little different. I am trying to do a bit of automation in the job development. what we do manually by dragging reusable dataflows, workflows, custom functions in to new jobs and making necessary customizations in them - i’m trying to create an ‘intelligent code developer software’ :slight_smile: which automates this manual reuse of the components for me.


namithc (BOB member since 2011-07-07)