Inserting information into DS_AUDIT

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
etlbets
Premium Member
Premium Member
Posts: 25
Joined: Wed Jul 25, 2007 8:51 am

Inserting information into DS_AUDIT

Post by etlbets »

Is it possible to include comments in the "Reason for modification" in DS_AUDIT. I am trying to include which record number is associated with the jobs found in in DS_AUDIT for a external ticketing system. Used for our SOX audits.

Current command being used
SORT DS_AUDIT WITH DTC BY.DSND DTC INSTANCE DTC CREATOR ID-SUPP MODS.

If I could join DS_AUDIT with another table in Universe that would work as well.

Thanks

Bren
etlbets
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Inserting information into DS_AUDIT

Post by chulett »

etlbets wrote:If I could join DS_AUDIT with another table in Universe that would work as well.
Well, that is certainly possible. Join tables there just like you would anywhere else, use standard SQL syntax rather than the UniVerse Retrieve syntax that I assume that "sort" is part of.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes it's easy to do, but the fact that your audit table is editable would violate your SOX requirements, at least for a vigilant auditor. Therefore the separate table is probably better. It would need to be keyed by KEY, INSTANCE and DTM.

Make use of dynamic normalization to find the appropriate row in the nested table to edit, if you're going to update DS_AUDIT directly.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
etlbets
Premium Member
Premium Member
Posts: 25
Joined: Wed Jul 25, 2007 8:51 am

Post by etlbets »

ray.wurlod wrote:Yes it's easy to do, but the fact that your audit table is editable would violate your SOX requirements, at least for a vigilant auditor. Therefore the separate table is probably better. It would need to be keyed by KEY, INSTANCE and DTM.

Make use of dynamic normalization to find the appropriate row in the nested table to edit, if you're going to update DS_AUDIT directly.
Ray, I am not an expert with Universe would you have an example of how you would join tables and how I would go about updating the tables so that it could only be written once. How does one get the dynamic normalization. Is this thru Universe commands or DS admin.

Thanks

Bren
etlbets
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, use standard SQL statements to join tables just like you would in any other database.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

The key is 2 part on jobs. The second part is the job name. You would need to write an I-descriptor to create a job name field to join to DS_JOBS and then maybe to DS_JOBOBJECTS to get short description or long description. If you want to read this in DataStage then you need a few more tricks.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Oh, yuk. An old Pickie approach!

You can do it all with SQL. The second table is a regular table, as noted.

Dynamic normalization is accomplished by specifying the table name and the association name, separated by an underscore. For example:

Code: Select all

SELECT * FROM DS_AUDIT_MODS ;
This will only yield the primary key of the base table (KEY or @ID) and the multi-valued fields in the association. If you want full normalization the way the UniVerse stage does it, then you use an UNNEST operator. For example:

Code: Select all

SELECT * FROM UNNEST DS_AUDIT ON MODS;
In this case all columns from the base table are available (much as they would be in a Pick-style BY-EXP expansion).

In either case the "table" (either DS_AUDIT_MODS or UNNEST DS_AUDIT ON MODS) may be given an alias name and/or joined to another table with an appropriate key structure.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Mr. Pick is complaining about Pick style. OMG!
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Never was. Was a Primate.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

[groan]
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply