mongodb源表--->group3_mongo.appbehaviorpoint(hive) --->ods.appbehaviorpoint(hive)
group3_mongo.appbehaviorpoint 只是个mongodb到hive的映射
ods.appbehaviorpoint 才是真正的同步目标表
-----------------------------------------
-- 2022/02/22日更新
---
1.如果mongodb源表增加了字段,那么group3_mongo.appbehaviorpoint 需要先drop table 才行,然后再执行建表语句。
一.
drop table group3_mongo.appBehaviorPoint;
二.创建映射
create external table group3_mongo.appBehaviorPoint
(
`_id` string,
track_id string,
anonymous_id string,
distinct_id string,
event string,
type string,
time string,
app_id string,
app_name string,
app_version string,
device_id string,
is_first_day string,
lib string,
element_type string,
lib_method string,
lib_version string,
manufacturer string,
model string,
network_type string,
os string,
longitude string,
latitude string,
os_version string,
element_