mysql --local-infile=1 -h localhost -u root -p -e "LOAD DATA INFILE '/var/lib/mysql-files/30daysFcst.csv' INTO TABLE MYDB.30Days_Forecast_File FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 LINES (AREA_ID,@T_Date,State,District,@Date,Tmax,Tmin,RHmax,RHmin,Wind_Speed,Rainfall) SET T_Date= STR_TO_DATE(@T_Date, '%d-%b-%Y'),Datadate= STR_TO_DATE(@Date, '%d-%b-%Y');"
Monday, August 2, 2021
Subscribe to:
Post Comments (Atom)
Powered by Blogger.
No comments:
Post a Comment