jyothi12389
Programmer
Hi,
The below code is working in MySql Workbench.
SET GLOBAL local_infile = true;
LOAD DATA INFILE
"C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/test.CSV"
INTO TABLE testDB.tbl
character set latin1
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
IGNORE 1 LINES;
But I want to schedule the dataloading to mysql table:
the below code is not working:
SET GLOBAL event_scheduler = ON;
DELIMITER $
CREATE
EVENT `testjayaEvent`
ON SCHEDULE EVERY 5 MINUTE STARTS '2021-02-16 00:00:00'
DO
BEGIN
LOAD DATA INFILE
"C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/test.csv"
INTO TABLE testDB.tbl
character set latin1
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
IGNORE 1 LINES;
END $
DELIMITER ;
please assist me in this regard
The below code is working in MySql Workbench.
SET GLOBAL local_infile = true;
LOAD DATA INFILE
"C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/test.CSV"
INTO TABLE testDB.tbl
character set latin1
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
IGNORE 1 LINES;
But I want to schedule the dataloading to mysql table:
the below code is not working:
SET GLOBAL event_scheduler = ON;
DELIMITER $
CREATE
EVENT `testjayaEvent`
ON SCHEDULE EVERY 5 MINUTE STARTS '2021-02-16 00:00:00'
DO
BEGIN
LOAD DATA INFILE
"C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/test.csv"
INTO TABLE testDB.tbl
character set latin1
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
IGNORE 1 LINES;
END $
DELIMITER ;
please assist me in this regard