How to read a .atl file (BODS 4.0)

I have a requirement where i need to read a .atl file using a macro or something for reviewing a code created by other developers.
We have a framework and i would like to begin with basic things like to find out if the developer has given description under job properties and if annotations are present.
Some idea on the same can be real help !!


Siddhant Tyagi :india: (BOB member since 2013-05-09)

instead of parsing ATL use the XML export of Objects, take a few sample jobs and DF and export them using -XX from command line as XML or you can do that from Designer also

parse these XML files to do the validation
actually you could createa XSD using these sample XML files (using some tool like xsd generator etc) and create a DS job itself to do the validation

if you are looking only for descriptions of main objects like job, wf and Df then you can query the AL_ATTR table, it stores the description, look for attr_name = ‘description’ the parent_objid is the object_key in the AL_LANG table


manoj_d (BOB member since 2009-01-02)

Thanks for the response Manoj :slight_smile:

But are you saying that i can do my code review using a dataflow ?
And how will we query the metadata table AL_ATTR ? through SQL transform in another DF is it ?

Can u please elaborate !

Thanks
SiD


Siddhant Tyagi :india: (BOB member since 2013-05-09)

I am still looking for some responses here. I am working on a code review tool for BODS where the .atl exported and put in some folder on local machine will be reviewed.


Siddhant Tyagi :india: (BOB member since 2013-05-09)

I had to find all the Dataflows that used a particular property. To do this I found the most recent version (DS 3.x) of the object and then contatenated together the source from the object from the al_langtext table in the repository. I just used SQL to find the property and the value for it. That just seemed a lot easier than working with an ATL export.


eganjp :us: (BOB member since 2007-09-12)

That makes some sense to me. Can you be little more elaborative with that explanation? I would like to explain my requirement :-

I am creating a macro that would ensure no framework components get selected while exporting the ATL of a particular job. So there are a few framework components (like datastore, workflow, Custom functions etc.) that I would check. Now a ctrl+f in ATL won’t work since the name can be referenced anywhere.
So how do I find the component names from right tags. I am not able to understand an ATL structure.

Thanks in adv !

SiD


Siddhant Tyagi :india: (BOB member since 2013-05-09)

If the framework components have been excluded from the export why would they show up in a text search ? If you find the framework component in the .ATL file doesn’t that mean that the export included it?


eganjp :us: (BOB member since 2007-09-12)

Edit the ATL file. The first couple of lines will have a version number. Change the version number to match either AL_VERSION in your 3.0 repository or the version of Designer. You’ll likely run into lost functionality and possibly objects that simply don’t work any more in 3.0 due to the new features and changed features in 4.x.

I wouldn’t recommend downgrading from 4.x to 3.x. I think it will be a huge hassle.


eganjp :us: (BOB member since 2007-09-12)

@Jim - Sorry for responding late…I was in London working on a hybris project. In response to your question - yes - you are correct. My previous comment misguided a bit i believe. But to clarify, i was not restricting the ATL export using this macro. Macro was just supposed to verify if some framework components were exported by mistake.
The whole problem was that instead of using Central Repo for version history maintenance we used ATL exports and saved them on RTC. Developers were not exporting the jobs correctly which at times led to issues while deployment in higher environments.

PS - i am not working on that project anymore but knowing the solution would be beneficial for me and readers.

Cheers !! :+1:


Siddhant Tyagi :india: (BOB member since 2013-05-09)