I am trying to import data into mysql using
LOAD DATA INFILE "C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/coviddeaths.csv"
INTO TABLE coviddeaths
COLUMNS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES;
I am getting error 1265 while importing data with this method at a column.
The error says Error Code: 1265. Data truncated for column 'new_cases_smoothed' at row 1
This column in csv file has values ranging from -525 to 826374.286 . The column contains more than 10K unique values. Column contains null values, integers and decimals like the numbers stated above.
I tried setting the datatype as float as well as double but getting the same error every time. Data set is taken from https://ourworldindata.org/covid-deaths
I am still a newbie at data analytics so I don't know much so any help will be appreciated. Thanks in advance.