technical skills grow

Responsive Ads Here

Monday, August 2, 2021

Load data from mysql

 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');"

No comments:

Post a Comment

Powered by Blogger.

Labels

Contact Form

Name

Email *

Message *

Search This Blog

Blog Archive

Ad Code

Responsive Advertisement

Recent Posts