-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharticles_load.sql
32 lines (27 loc) · 1.03 KB
/
articles_load.sql
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
30
31
32
--TO LOAD DATABASE: run postgres and run: psql -d postgres -U isdb -f articles_load.sql
DROP TABLE IF EXISTS Articles CASCADE;
CREATE TABLE Articles (
id INTEGER,
abstract TEXT,
articleID TEXT,
articleWordCount INTEGER,
byline TEXT,
documentType TEXT,
headline TEXT,
keywords TEXT,
multimedia INTEGER,
newDesk TEXT,
printPage INTEGER,
pubDate TEXT,
sectionName TEXT,
snippet TEXT,
source TEXT,
typeOfMaterial TEXT,
webURL TEXT,
HeadlinePolarity NUMERIC,
HeadlineSubjectivity NUMERIC,
SnippetPolarity NUMERIC,
SnippetSubjectivity NUMERIC,
SnippetEntropy NUMERIC
);
\copy Articles FROM 'ArticlesFinal_df.csv' csv encoding 'ISO8859-1' header;