-- test
SELECT date_t
,id
,json_extract_scalar(feils,'$.PromoId') AS PromoId
,split_part(json_extract_scalar(feils,'$.url'),'_',1) AS prefix
,split_part(json_extract_scalar(feils,'$.url'),'_',2) AS types
,split_part(json_extract_scalar(feils,'$.url'),'_',3) AS feature
,'xxxxx' AS click_type
FROM table_c
WHERE dt = '$date$'
格式化之后
-- test
SELECT date_t
,id
,json_extract_scalar(feils,'$.PromoId') AS PromoId
,split_part(json_extract_scalar(feils,'$.url'),'_',1) AS prefix
,split_part(json_extract_scalar(feils,'$.url'),'_',2) AS types
,split_part(json_extract_scalar(feils,'$.url'),'_',3) AS feature
,'xxxxx' AS click_type
FROM table_c
WHERE dt = '$date$'
格式化之后as没有对齐了,很奇怪
格式化之前
格式化之后