I have to load and append data to a MySQL table from many files. The files are stored in the same directory.
To load data from a single file I use:
load data local infile 'D:\\MyDir\\file.DAT' into table catasto.dm_import fields terminated by '|' lines terminated by '\n';
Now I need to append every file contained in the directory D:\MyDir
into table dm_import
.
How can I do this? I work with MySQL Workbench and Python.