Shelll Script for row count

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

Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Shelll Script for row count

Post by Nagaraj »

Is there any script which does a count on the dimension table and the source table.?
you know like how many INSERTS, how many UPDATES and how many DELETES in the target table.
Could you please send me some template so that i get an idea on how to get the record couns based on I,U and D, UI , UD etc

Thanks
-Raj
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Download ETLStats from Kim Duke's website - note, however, that the row counts from DataStage are simply the rows that are sent to the database - not necessarily the same as the number that were successfully inserted/updated/deleted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

Thanks :) :)
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

This says me to maintain some tables in oracle which i dont want to do .
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You don't have to save them to Oracle - you can adapt the application and save wherever you wish.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Row Count

Post by Nagaraj »

Could you please let me know in brief how to do this?
Thanks for the information.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Just... change them. :?

What is your target database?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

Its Oracle.
dspxlearn
Premium Member
Premium Member
Posts: 291
Joined: Sat Sep 10, 2005 1:26 am

Post by dspxlearn »

Nagraj,

You can incorporate 'dsjob' commands with combination of unix commands in your shell which you use to run your datastage job.
Steps:
Standardize all the link names from where you want to count the no. of records processed.
List all your grep you into a file using -lstages using dsjob command.
Then write a loop to get the information of the stages by 'grep'ing your standardized link names. Use -stageinfo option to get the link count of each stage.
Thanks and Regards!!
dspxlearn
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Wait... you don't want to save things in Oracle or you do? :?

If not, where or in what format do you want to store things?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

I want to get the count of my Target table which is a database and it is maintaining history, and i shd make sure the counts are correct both from the source side and as well from target side,

for example

1 Insert is 1 Insert in Target
1 Update is 1 Insert plus 1 Update in target i.e 2.

How do i get this in the script.
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

Also for

1 delete there will be one Delete as Update.
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

I imported all the jobs in my Project,

The folders i get is
ETL_Job_Params
ETL_Metadata
ETL_QA_Jobs
ETL_Reports
ETL_Row_Counts
Metadata
Misc
Can you Tell me in which folder what i have to change and go ahead and get the rowcounts for all the jobs which i have in my sequences.?
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

Could you please let me know how to use the job,

EtlGetRowCountsFromLog in the ETL stats folder
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

I can store in Sequential File.
Post Reply