Link Derivation
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 43
- Joined: Mon Mar 03, 2008 10:58 pm
- Location: Chennai
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Re: Link Derivation
Export the job to a DSX, and search for "Derivation". If you have Perl installed:sathishmca wrote:How to get the derviation of all links in a job ?
Code: Select all
perl -ne "$lk=$_ if /^ Name/;$f=$_ if /^ Name/;print $lk.$f.$_ if /^ +Derivation/;" filename.dsx
Slightly more sophisticated, includes job name, removes repetition:
Code: Select all
perl -ne "$j=$_ if /^ Identifier/;$lk=$_ if /^ Name/;$f=$_ if /^ Name/;if (/^ +Derivation/){print $j.$lk.$f.$_;$j=$lk=''}" jobname.dsx
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
Re: Link Derivation
Hey Phil (or any Perl Gurus here),PhilHibbs wrote:Export the job to a DSX, and search for "Derivation". If you have Perl installed:sathishmca wrote:How to get the derviation of all links in a job ?
This will print out the link name, field name, and derivation for every output field in the job.Code: Select all
perl -ne "$lk=$_ if /^ Name/;$f=$_ if /^ Name/;print $lk.$f.$_ if /^ +Derivation/;" filename.dsx
Slightly more sophisticated, includes job name, removes repetition:Code: Select all
perl -ne "$j=$_ if /^ Identifier/;$lk=$_ if /^ Name/;$f=$_ if /^ Name/;if (/^ +Derivation/){print $j.$lk.$f.$_;$j=$lk=''}" jobname.dsx
Can you change the second Perl script so that it returns the JobName (StageName if possible) that contains the string that I want to search for? The search string may be part of the SQL in an ORAOCI stage, Xfmr derivation or even in an Annotation.
Thank you.
gateleys