· 10 years ago · Aug 22, 2016, 04:06 PM
1CREATE EXTERNAL TABLE ghost_user_history_log(
2 logtime bigint,
3 id string,
4 socnet string,
5 gender string,
6 age bigint,
7 traffic string,
8 traftype string,
9 regtime bigint,
10 last_action_time bigint,
11 country string,
12 currency string,
13 language string,
14 email string,
15 time_to_first_payment bigint,
16 playshare bigint,
17 avg_session_length bigint,
18 avg_sessions_per_actday bigint,
19 friends bigint,
20 churn_flag bigint,
21 churn_forecast bigint,
22 ingame_cur_balance bigint,
23 last_offer_start bigint,
24 last_offer_finish bigint,
25 payment_count bigint,
26 offer_payment_count bigint,
27 mob_payment_count bigint,
28 giftcard_payment_count bigint,
29 fb_promo_show bigint,
30 fb_promo_use bigint,
31 ow_count bigint,
32 ow_cur_receive bigint,
33 total_payments bigint,
34 offer_payments bigint,
35 mob_payments bigint,
36 giftcard_payments bigint,
37 last_offer_payment_time bigint,
38 last_payment_time bigint,
39 sum_base_amount bigint,
40 sum_offer_base_amount bigint,
41 notif_count_since_last_act bigint,
42 notif_response_prob bigint,
43 last_notif_receive_time bigint)
44 partitioned by (dt string, hr int)
45 ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' LOCATION 's3://webgames-emr-output/dynamodb/log/gameGhostUser';
46alter table drools.ghost_user_history_log add IF NOT EXISTS PARTITION(dt='20160822', hr=16) LOCATION 's3://webgames-emr-output/dynamodb/log/gameGhostUser/2016/08/22/16';