-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload_csv.sql
More file actions
29 lines (26 loc) · 760 Bytes
/
Copy pathload_csv.sql
File metadata and controls
29 lines (26 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--
-- Create table for re:Invent interested sessions
--
DROP TABLE IF EXISTS `reinvent_interests`;
CREATE TABLE `reinvent_interests` (
`session_code` varchar(100) NOT NULL,
`session_title` varchar(2048) DEFAULT NULL,
`repeat` varchar(100) NOT NULL,
`abstract` varchar(2048) DEFAULT NULL,
`type` varchar(100) DEFAULT NULL,
`speakers` varchar(1000) DEFAULT NULL,
`start_time` datetime DEFAULT NULL,
`end_time` datetime DEFAULT NULL,
`venue` varchar(100) DEFAULT NULL,
`room` varchar(250) DEFAULT NULL,
PRIMARY KEY (`session_code`,`repeat`)
);
--
-- load data from CSV file into table
--
LOAD DATA INFILE 'aws-interests.csv'
INTO TABLE `reinvent_interests`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;