Regular use platform

 

 

-- select * from ods_eventID limit 10;

select 
    logmessage,
    -- regexp_extract(logmessage,'\\"Services\sType:ICALL\\"',0)  as serviceType
     regexp_extract(replace(logmessage,"\"",""),'Services Type:(.*?),',1)  as serviceType
from ods_eventID
limit 10;

-- 平台上查出来的字段:
-- "[{""POI Categories"":""-"",""POI Provider"":""NavInfo"",""POI Address"":{""Address"":""available"",""Latitude"":""available"",""Longitude"":""available""},""Additional Notes"":""-"",""POI Name"":""äž­å›œçŸ³åŒ–é¹ç«¹æºåŠ æ²¹ç«™""}]"
"{""Notes"":[""User: cleanupAdmin""],""Call Reason"":[""INVISIBLE_CLEANUP""],""Services Type"":""BCALL"",""Home Country"":""CN"",""Call Center"":""TSSB_CN"",""Event Duration"":3867,""Call ID"":""4D4837333433352509B09100@bmw.de""}"

select replace('"Services Type":"ICALL"',"T",111)

select replace(logmessage,"\"","")
from ods_eventID
limit 10;

select regexp_extract(replace("Services Type":"ICALL","Home Country":"CN","Call Center":"CU_ININ",",),'(Type)',0);


select regexp_extract('Services Type:ICALL,Home Country:CN,Call Center:CU_ININ','Services Type:(.*?),',1);

 

Guess you like

Origin www.cnblogs.com/wooluwalker/p/11641035.html