Step 2: Load company profile data

Download companylist.csv onto your local machine and then load it into Stage. Run the following command to load data into the company table using a Pipeline.

USE trades;
CREATE OR REPLACE PIPELINE trades.`company`
AS LOAD DATA STAGE 'companylist.csv'
BATCH_INTERVAL 2500
DISABLE OUT_OF_ORDER OPTIMIZATION
DISABLE OFFSETS METADATA GC
SKIP DUPLICATE KEY ERRORS
INTO TABLE `company`
FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\'
LINES TERMINATED BY '\r\n' STARTING BY ''
FORMAT CSV
IGNORE 1 LINES
(
`company`.`Symbol`,
`company`.`Name`,
`company`.`LastSale`,
`company`.`MarketCap`,
`company`.`IPOyear`,
`company`.`Sector`,
`company`.`industry`,
`company`.`Summary Quote`,
`company`.`extra`
);
START PIPELINE company;

Last modified: November 21, 2024

Was this article helpful?