Audit selectivity

Is it possible to desactivate the audit for some SQL statement called in python script.
I use some script to import file in a database in BLOB with code like in the ignition doc :

Examples This code would prompt the user to choose a file. If the user chooses a file, it would then read that file and upload it to a database table called Files into a BLOB column called file_data. path = system.file.openFile() if path != None: bytes = system.file.readFileAsBytes(filename) system.db.runPrepUpdate("INSERT INTO Files (file_data) VALUES (?)", (bytes))

The binarie code of the file is logged in the audit database and trigger an error because the action code is a varchar(255) in the audit table. I don’t want to log these kind of sql request. Is there a way to desactivate the audit for these request ???

No, there isn’t a way to turn off the auditing for a particular insert query. We need to add an argument to the runPrepUpdate function that would bypass the audit log. I will put a ticket in for that.

Do you know the version which wil have these functionnality ?

No, I don’t know when this will get put into Ignition. The ticket is in but doesn’t have a timeline right now.

I’ve slated the ticket against Ignition 7.5.0

I would like to know if the fonctionnality is present in the 7.5.4 released ?
in this case, what is the arg to use with the “system.db.runPrepUpdate”.


This [del]bug[/del] feature hasn’t been [del]fixed[/del] implemented yet, but it has high priority in our ticket system so it should be fixed soon. I can’t provide a definitive timeline, however.

I love the “edits” James, they kind of make me think I’m actually reading a forum for an OS from a certain major software company. :smiley:

I too would like the selective audit (even if it sounds like an oxymoron) but perhaps just an entry in the audit trail that doesn’t include the BLOB data would be beneficial.


Well, it is true - it is technically a feature, I misspoke by saying it was a bug. Anyway, bottom line is it will be fixed soon.

This has been done for 7.5.6