Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

Trying to understand auditing record count for flatfile

$
0
0

I am testing out Auditing for the record count of a flat file.

 

My goal is to raise an error if the record count exceeds a certain threshold.

 

I have set it up this way:

 

Select the flat file object in the Data Flow

Click Tools -> Audit... from the menu

Right click on the flat file and select count

This results in "Count" under the Audit Function Column and the count variable ($Count_HR_IOR_I001_FILEMERGE in my case) under the Audit Label column

 

step1.jpg

 

Next -

Click the Rule tab

Click Add.

For this basic test I just wanted to test against a constant - say 100,000 records for the threshold.  The actual file I will be using has only 8847

I enter this as a custom rule:  > 100000

I also click the script box and have it print out the variable:  print ($Count_HR_IOR_I001_FILEMERGE || ' >= 100000);  Again, this is just a test.  Going forward I might try using a variable for the 100,000 which I would set ahead of this step

 

step2.jpg

I click on the validation and it reports no errors.

 

However when I run this I get an unexpected result because this audit validation fails

 

In the job log I see this which I believe to be the "script" I entered for the audit.  If so, 8847 is the correct count, but it is not >= 100000

 

results1.jpg

 

Furthermore, when I look the error detail part of the log (stop sign)  I see this which again is telling me that the count exceeds 100000, which it does not

 

results2.jpg

 

From what I see, I believe I have this audit set up correctly, but I am wondering what I am missing as far as how to properly use this feature.

 

Any help would be really appreciated.


Thanks,

 

Jeff Henke


Viewing all articles
Browse latest Browse all 4013

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>