Bug #15026 File/directory watcher, File System Trigger?
Description:
Currently, external means of determining if a file exists in a specific directory must be used to perform such actions on that file. For example, cron, or Windows' Task Scheduer, must be run periodically to determine if an import file exists in a directory, and if so, it must fire off some command-line to perform actions on these files, such as mysqlimport.exe
How to repeat:
make mysql watch for a file and do something with it if/when it appears and isn't locked.
Suggested fix:
It would be nice to have a file/directory watcher, gui-configurable. Maybe this would be considered a File System Trigger.
For example, watch a certain directory for files with specific names, or extentions. Allow file checking to make sure file isn't in use/open. Perform actions on these files such as import/load, write to from table X, etc.
My specific need is to watch for a directory to which delimited text files are dumped on a fairly random basis. When they're found and are not "in-use", import into a table. Right now I've got a custom Windows Service that I built which watches for file activity and executes the mysqlimport.exe with all the parameters necessary to import the file into a specific table.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.