As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
Is there a 'Job ID' global variable that I can capture and add to my load. I want to: 1. Tag all dimension adds and updates with a job_id 2. Reference all fact rows to a job_idThis message has been edited. Last edited by: <Kathryn Henning>,
Do you just want the name of your flow? That's just &&CM__REQUEST.
Or do you want the system generated Job ID: 20130712145922_86ae5901?
That's a bit tricky because the Job ID is generated by the scheduler so it's not available in the the running flow. However you could get it from the DataMigrator log. Note that this will only work with scheduled or submitted flows. If you run a flow from the DMC or WC the scheduler doesn't get used.
Create a stored procedure with the following.
-SET &JOBNAME=GETTOK(&&CM__REQUEST, 128, 2, '/', 64, 'A64');
-TYPE JOBNAME &JOBNAME
-DEFAULT &JOBID = ' '
SELECT S_REQ_ID AS JOBID
WHERE STAT_SBM_T IN
(SELECT MAX(STAT_SBM_T )FROM ETLSTATS WHERE S_REQ_NAME = '&JOBNAME') ;
TABLE ON TABLE HOLD AS JOBID FORMAT ALPHA
-TYPE JOB ID &JOBID
Now you have a global variable &&JOBID that you can use in your transformations. Also this assumes that you are only running one flow of the same name at a time.This message has been edited. Last edited by: Clif,
Posts: 397 | Location: New York City | Registered: May 03, 2007