Commit 8637cc17 authored by 杨林's avatar 杨林

埋点sql

parent 5703310b
DROP TABLE IF EXISTS qm_tmp.event_track;
CREATE TABLE IF NOT EXISTS qm_tmp.event_track (
track_id BIGINT COMMENT '事件ID',
distinct_id STRING COMMENT '设备ID',
lib_detail STRING COMMENT '库详情',
lib_version STRING COMMENT '库版本',
lib STRING COMMENT '库操作系统',
app_version STRING COMMENT 'app版本号',
lib_method STRING COMMENT '库方法',
event_name STRING COMMENT '事件名称',
`type` STRING COMMENT '记录类型,区分本条数据是埋点数据还是其他数据',
properties STRING COMMENT '埋点事件属性 json数组',
HOST STRING COMMENT '埋点服务器',
user_agent STRING COMMENT '用户代理',
ua_platform STRING COMMENT '用户手机平台 操作系统类型',
ua_version STRING COMMENT '操作系统版本',
ua_language STRING COMMENT '操作系统语言',
`connection` STRING COMMENT '连接状态',
Pragma STRING COMMENT 'Http协议版本号',
cache_control STRING COMMENT '缓存控制',
accept STRING COMMENT '',
accept_encoding STRING COMMENT '接收编码',
ip STRING COMMENT 'ip',
ip_info STRING COMMENT 'ip信息 json',
url STRING COMMENT '服务器url',
referrer STRING COMMENT '来源页面',
remark STRING COMMENT '环境标记',
user_id STRING COMMENT '用户id',
created_at STRING COMMENT '创建时间'
) PARTITIONED BY ( dt string, hr string, mm string )
TBLPROPERTIES (
'partition.time-extractor.timestamp-pattern' = '$dt $hr:$mm:00',
'sink.partition-commit.delay' = '0s',
'sink.partition-commit.watermark-time-zone' = 'Aisa/Shanghai',
'sink.partition-commit.policy.kind' = 'metastore'
);
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment