-- you can copy and paste the whole thing into sql and run it
-- the dataset to be downloaded here: https://drive.google.com/file/d/1xNzTUjZjcn9xR_QUZbHMdPQizkHEo063/view?usp=sharing
-- I'm using MySQL workbench, trying to import the dataset which is 217m size
-- I have Defined the dataset encoding mode - Set character set for all components to utf8mb4
-- No matter what i do, which dataset i changed to , it all comes back with the same error code 1083 Field separator argument is not what is expected;
-- please help, I have talked to chatgpt the whole time trying to solve this problem but with everything chatgpt told me to do, the issue is still there
-- i have confirmed my dataset is csv with comma
SET NAMES utf8mb4;
ALTER DATABASE greenhouse SET utf8mb4;
ALTER TABLE cement_emissions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- i have also confirmed local file is enabled to access
show variables like "local_infile";
set global local_infile=1;
CREATE TABLE cement_emissions (
-- I tried both of the paths already
-- LOAD DATA INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\SQL projects\Greenhouse Gas Emissions Dataset more than 80G\manufacturing.asset_cement_emissions.csv'
LOAD DATA INFILE 'C:\\ProgramData\\MySQL\\MySQL Server 8.0\\Uploads\\SQL projects\\Greenhouse Gas Emissions Dataset more than 80G\\manufacturing.asset_cement_emissions.csv'
INTO TABLE cement_emissions
FIELDS TERMINATED BY ','
-- I've also tried all the following types
-- FIELDS TERMINATED BY ';'
-- FIELDS TERMINATED BY '/t'
-- FIELDS TERMINATED BY '\r\n'
-- FIELDS TERMINATED BY '\r'
ENCLOSED BY '""'
ESCAPED BY '\\'
LINES TERMINATED BY '\r\n'
IGNORE 1 ROWS ;