Needed some idea about transaction volume check on daily basis


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Needed some idea about transaction volume check on daily basis
# 1  
Old 02-21-2020
Needed some idea about transaction volume check on daily basis

Hi All,

Good morning. Smilie

I need some idea about transaction volume check on daily basis.
Though I have some basic idea like:
  • > Check mean value for 3 months of historical data and then add/subtract 'n' number (could be 100 to 10000 as per source systems) to create a MAX and MIN range on daily basis (maybe?).
  • > So this way if the volume does not fall on this range, an e-Mail should come (SMTP e-Mail functionality is already there) or a job failure or something like that.

Please let me know if this can be a right process or there are better process to check this.

I'm open for ideas (Coding: sh/ksh/py).

Cheers,
# 2  
Old 02-21-2020
Quote:
transaction volume
Please give the details what you are talking about.
  • MySQL database transactions on Linux RedHat?
  • Email transactions on HP-UX email server?
  • An apache webserver on AIX?


Before anyone can offer any useful suggestions, you need to describe in details your system architecture and what you are trying to accomplish.
# 3  
Old 02-21-2020
Transaction volume as in Bank Transaction Volume ( currency/cash/wire transactions by individuals [you, me, others Smilie]).

So each day, Source System delivers these transaction.
So I want to see if there are volume deviation for any day by comparing historical volume.

i.e. for a given date: 14-Dec-2019 --- Say we have received 150 Transactions for SRC1 which is far less compared to historical volume (ranged between 250-450 Transaction daily; sample data given below).
so in the above case
Code:
maxVolRange=450
minVolRange=250
if $volume < $minVolRange or $volume > $maxVolRange 
then
    validation job fail (or an e-Mail will come) 
else
    do bla bla
fi

The value of maxVolRange and minVolRange should change daily by checking historical data of Transactions received from source.

Sample data:
Code:
Date,Day of Week,Src1  Trxn Count,src2 Trxn Count
13-Dec-19,Friday,288,12705
12-Dec-19,Thursday,258,12064
11-Dec-19,Wednesday,419,11622
10-Dec-19,Tuesday,204,12287
9-Dec-19,Monday,282,11842
7-Dec-19,Saturday,0,335
6-Dec-19,Friday,295,12577
5-Dec-19,Thursday,513,12240
4-Dec-19,Wednesday,529,12257
3-Dec-19,Tuesday,442,11598
2-Dec-19,Monday,252,12496

So I want derive these maxVolRange and minVolRange on daily basis by calculating average/mean average... (maybe?) to check if we are receiving correct data or there is no missing data.

Please let me know if I was able to explain this.

~ Saps.
# 4  
Old 02-21-2020
Thanks. But where do you get these numbers?

Quote:
Transaction volume as in Bank Transaction Volume
  • Do these number come from a DB query?
  • Counting web server page views?
  • Summing up hamsters as the fly in and out of the room?

When building a new system task, we should clearly know the interface; and you have not provided any of the details.

(even in your second reply).

You have describe "what you want" but you have not described nor provides any sample input files or the spec of the API, etc.
# 5  
Old 02-21-2020
Hi Neo,

Apologies... Let me try to answer your queries:

Quote:
When building a new system task, we should clearly know the interface; and you have not provided any of the details.
It is an existing system. Current high level architecture:

Source system (Reuters, Bloomberg etc) ---> provide transaction details in some flat files to an internal team in raw format [.dat files] ---> That team apply some transformation logic to generate required files for our application [Infra: Hadoop, Unix] ----> we load these files [Infra: Unix, Oracle] ---> apply ETL transformation logic [Infra: Unix, Oracle] ---> Run rules/logic [Infra: Unix, Oracle] ---> generate alerts [Infra: Unix, Oracle] .


Quote:
Do these number come from a DB query?
Yes, Oracle SQL query (Manual run in Database to check on daily basis. SQL output data provided as a sample csv file in previous post)

.
Now I would like to verify the data volume just before ETL transformation layer.

Please let me know if I'm able to provide required answer.

Cheers,
~ Saps
# 6  
Old 02-22-2020
Thanks for that High Level Overview, ~ Saps

That sounds interesting.

Do you mind, then, to provide a fragment (sample input) to the code you need help with, maybe a few dozen or so lines?
# 7  
Old 02-22-2020
Hi Neo,

I have not started the code development yet, but I have something in mind
  • - To get an average or median then add some number to decide MAX and MIN range
  • - Then check today's transaction count if it is falling between this range
  • - If not, job fails/mail comes.
  • - This MAX and MIN value will change daily by checking the historical data over a period of time (say 3 to 6 month)

I wanted to know if this could be a correct approach to determine the "daily volume range" or if there are any better ideas to determine this.

Cheers,
Saps.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Difference between BEGIN TRANSACTION & START TRANSACTION?

What's the difference between BEGIN TRANSACTION vs START TRANSACTION? Also goes for COMMIT TRANSACTION vs COMMIT? (0 Replies)
Discussion started by: dan139
0 Replies

2. Shell Programming and Scripting

Script to count files on daily basis

Hi all I need to count files on a daily basis and send the output via email, what I am currently doing its simply running the following:ls -lrt *.cdr | awk '{if(($6 == "Jul") && ($7 == "13")) print $0}' | wc -l, which in this case it will count all files with extension "cdr" from the month of... (13 Replies)
Discussion started by: fretagi
13 Replies

3. Shell Programming and Scripting

Script to move file on a daily basis

Hi! Please I need help on the a script that would pick one file in a directory, change its name, them change its permissions, them move to a different directory, but has to be done on a daily basis, and the file that is being moved to its final destination has to have the following format:... (7 Replies)
Discussion started by: fretagi
7 Replies

4. UNIX for Dummies Questions & Answers

Tracking the script(.sh) files triggered on daily or monthly basis from source

Hi Gurus, Is there any solution for tracking the script(.sh) files triggered on daily or monthly basis from source - Datastage (Routines) Needs to find out if this scripts are running on daily just want to know that is there anything to track Thanks in Advance (2 Replies)
Discussion started by: SeenuGuddu
2 Replies

5. UNIX for Advanced & Expert Users

AIX idea needed to check the logs updated date and time

Hi with the help of Gabriel canepa, i have just edited filename only in his code. The help which i got and he helped is 1) I have around 22 logs and each log should be updated in the last 24 hours from the current timestamp. 2) It should check for ERROR message (not error,Error) in the log and... (2 Replies)
Discussion started by: Kalaihari
2 Replies

6. Shell Programming and Scripting

Creating directory daily basis...

Need help on this script. the month is not changing to February... #!/bin/bash for X in `seq 1 100` do DATE=`date +%Y-%m-%d "--date=${X} day ago"` Y=`date +%Y` M=`date +%m` D=`date +%d "--date=${X} day ago"` DIR=/home/LogBackup for i in `seq 1 ` do if ;then # ... (1 Reply)
Discussion started by: alelee
1 Replies

7. AIX

Basic Filesystem / Physical Volume / Logical Volume Check

Hi! Can anyone help me on how I can do a basic check on the Unix filesystems / physical volumes and logical volumes? What items should I check, like where do I look at in smit? Or are there commands that I should execute? I need to do this as I was informed by IBM that there seems to be... (1 Reply)
Discussion started by: chipahoys
1 Replies

8. Shell Programming and Scripting

Zip all the files within a directory on a daily basis

I need to zip all the files within a directory on a daily basis and store them as a zip file within that directory with the date in its naming convention I have file extentions .log .lst and .out's within that directory How do i do this task zip -mqj mydir/allzip$YYMMDDDD.zip mydir/*.* ... (5 Replies)
Discussion started by: ramky79
5 Replies

9. HP-UX

HPUX printers & plotters disable on a daily basis

HI all, I've been having issues with printers and plotters disabling with no reason at all...It could happen to the same workstation once a day or once a week..There is nothing consistant..I stop and restart the spooler, only then can I re-enable the disabled printer.... If anyone is... (0 Replies)
Discussion started by: Shutdown
0 Replies
Login or Register to Ask a Question