??????????????????????????????-VOC??
????VOC??Voice Of Customer?? ????????綽?????????????????????????????????????????????????????????????????????????????????????????????????
????VOC ?????????????????????????
????1???????????????????????
????2???????????????????????????з??????
?????????????????????????????????????
???????  ?????????????????????-ETL????
????????????????hive?????datax
???????????????????????????????дhive?????“?????”???????У???????????dataX?????????????????????
?????????????(?????)
????Datax?????????????
???????????????
????1???????????
??????????????????????м?????????????????????????hive???review
???????voc???????????????????????????????????hive???review??????????????????????????????弰?????????????????????????????????????Щ??????????
???????????
create table if not exists r_yunong_rest ( #???????м??
report_date         string??
prd_code            string??
question_code       string??
date_type           string??
value_type          string??
base_value          string??
gmt_create          string??
gmt_modified        string
) partitioned by (pt string)
row format delimited fields terminated by '"'
lines terminated by ' '
STORED AS TEXTFILE;
insert overwrite table r_yunong_test #?????????
PARTITION (pt='$env.lastPartition')
select  report_date??
prd_code??
question_code??
'D' as date_type??
'01'as value_type
count(case when sid is not null then sid when caseid is not null then caseid else null end) as  base_value??  #??????ε???????????
'$env.date' as gmt_create??
'$env.date' as gmt_modified
from r_test   #???????????????м??r_voc_fact_question???????
where pt='$env.lastPartition'
and question_code <>'unknown'
group by  report_date??prd_code??question_code;
?????????????????????????
????1???????????
????2?????????
????3???Щ???????????????????null???0?????
????4??????????????????????????????д???