-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAWS DB Structure
50 lines (43 loc) · 1 KB
/
AWS DB Structure
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
## RDS Database Table Structure
create table crimes
(
id int auto_increment
primary key,
crime varchar(100) null,
count int null
);
## Athena Database Table Structure
CREATE EXTERNAL TABLE `crimes`(
`id` int,
`case_number` string,
`date` timestamp,
`block` string,
`iucr` string,
`primary_type` string,
`description` string,
`location_description` string,
`arrest` boolean,
`domestic` boolean,
`beat` int,
`district` int,
`ward` string,
`community_area` int,
`fbi_code` string,
`x_coordinate` string,
`y_coordinate` string,
`year` int,
`updated_on` timestamp,
`latitude` string,
`longitude` string,
`location` string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
's3://aws-bda-assign1/bda_data/'
TBLPROPERTIES (
'has_encrypted_data'='false',
'transient_lastDdlTime'='1555142143')