Blog Stats
  • Posts - 5
  • Articles - 0
  • Comments - 5
  • Trackbacks - 1

 

BAM Durations

Ever notice the duration field in a BAM query? You end up with a value like 1.102304-3e. Well BAM by default shows you the duration in days. It is iactually quite easy to adjust this to whatever you want.

All you need to do is make a change to two of the views that are created for you;
1. The ActiveAliasView
2. The CompletedAliasView

Both of which can be found in BAMPrimaryImport. You are loking for a statement that will look like this;

[Duration] = CAST([TimeStamp] AS FLOAT) - CAST([TimeStamp] AS FLOAT

What you need to add is this;
[Duration] = CAST([TimeStamp] AS FLOAT)*24(For Days)*60(For Minutes)*60(For Seconds) - CAST([TimeStamp] AS FLOAT*24*60*60

You will notice that if you query the BAMPrimaryImport DB that all the durations will appear as seconds, but if you have a processed cube, it will still reflect the old data, and when you add the new data, it will become unreliable. So if you need to do this, you must be prepared to start the cubes from scratch.

Feedback

No comments posted yet.


Post a comment





 

 

 

Copyright © Todd Sussman