??????????????????????????????-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??????????????????????????????写???