Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Trying to understand auditing record count for flatfile

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

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

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

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

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

replied

Isn't it just the other way round? Audit rule  > 100000 means your input needs more than 100K lines. s your file contains 8847 lines only, the audit rule fails.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question