Ниже для BigQuery Standard SQL
#standardSQL
SELECT * EXCEPT(line),
REGEXP_EXTRACT(line, r';u1=(\w+);') AS u1,
REGEXP_EXTRACT(line, r';u2=(\w+);') AS u2,
REGEXP_EXTRACT(line, r';u3=(\w+);') AS u3,
REGEXP_EXTRACT(line, r';u4=(\w+);') AS u4,
REGEXP_EXTRACT(line, r';u5=(\w+);') AS u5,
REGEXP_EXTRACT(line, r';u6=(\w+);') AS u6,
REGEXP_EXTRACT(line, r';u7=(\w+);') AS u7,
REGEXP_EXTRACT(line, r';u8=(\w+);') AS u8,
REGEXP_EXTRACT(line, r';u9=(\w+);') AS u9,
REGEXP_EXTRACT(line, r';u10=(\w+);') AS u10,
REGEXP_EXTRACT(line, r';u11=(\w+);') AS u11,
REGEXP_EXTRACT(line, r';u12=(\w+);') AS u12,
REGEXP_EXTRACT(line, r';u13=(\w+);') AS u13,
REGEXP_EXTRACT(line, r';u14=(\w+);') AS u14,
REGEXP_EXTRACT(line, r';u15=(\w+);') AS u15,
REGEXP_EXTRACT(line, r';u16=(\w+);') AS u16,
REGEXP_EXTRACT(line, r';u17=(\w+);') AS u17,
REGEXP_EXTRACT(line, r';u18=(\w+);') AS u18,
REGEXP_EXTRACT(line, r';u19=(\w+);') AS u19,
REGEXP_EXTRACT(line, r';u20=(\w+);') AS u20,
REGEXP_EXTRACT(line, r';u21=(\w+);') AS u21
FROM `project.dataset.table`
вы можете протестировать, поиграть с выше, используя фиктивные данные, как в примере ниже
#standardSQL
WITH `project.dataset.table` AS (
SELECT 1 id, 'abc' other_cols, 'dc_pre=CKX1m_vLoOUCFZUAXAodcgQKfw;gtm=2oda21;auiddc=*;u1=en;u10=undefined;u11=undefined;u12=undefined;u13=undefined;u14=undefined;u15=undefined;u16=undefined;u17=undefined;u18=undefined;u19=undefined;u2=bsd;u20=undefined;u21=undefined;u3=undefined;u4=us;u5=undefined;u6=undefined;u7=undefined;u8=undefined;u9=undefined;~oref=https://localhost.dell.com/premier/us/en/rc1295291/' line UNION ALL
SELECT 2, 'xyz', 'dc_pre=CKX1m_vLoOUCFZUAXAodcgQKfw;gtm=2oda21;auiddc=*;u1=en;u10=a;u11=b;u12=123;u13=undefined;u14=undefined;u15=undefined;u16=undefined;u17=undefined;u18=undefined;u19=undefined;u2=bsd;u20=undefined;u21=undefined;u3=undefined;u4=us;u5=undefined;u6=undefined;u7=undefined;u8=undefined;u9=undefined;~oref=https://localhost.dell.com/premier/us/en/rc1295291/'
)
SELECT * EXCEPT(line),
REGEXP_EXTRACT(line, r';u1=(\w+);') AS u1,
REGEXP_EXTRACT(line, r';u2=(\w+);') AS u2,
REGEXP_EXTRACT(line, r';u3=(\w+);') AS u3,
REGEXP_EXTRACT(line, r';u4=(\w+);') AS u4,
REGEXP_EXTRACT(line, r';u5=(\w+);') AS u5,
REGEXP_EXTRACT(line, r';u6=(\w+);') AS u6,
REGEXP_EXTRACT(line, r';u7=(\w+);') AS u7,
REGEXP_EXTRACT(line, r';u8=(\w+);') AS u8,
REGEXP_EXTRACT(line, r';u9=(\w+);') AS u9,
REGEXP_EXTRACT(line, r';u10=(\w+);') AS u10,
REGEXP_EXTRACT(line, r';u11=(\w+);') AS u11,
REGEXP_EXTRACT(line, r';u12=(\w+);') AS u12,
REGEXP_EXTRACT(line, r';u13=(\w+);') AS u13,
REGEXP_EXTRACT(line, r';u14=(\w+);') AS u14,
REGEXP_EXTRACT(line, r';u15=(\w+);') AS u15,
REGEXP_EXTRACT(line, r';u16=(\w+);') AS u16,
REGEXP_EXTRACT(line, r';u17=(\w+);') AS u17,
REGEXP_EXTRACT(line, r';u18=(\w+);') AS u18,
REGEXP_EXTRACT(line, r';u19=(\w+);') AS u19,
REGEXP_EXTRACT(line, r';u20=(\w+);') AS u20,
REGEXP_EXTRACT(line, r';u21=(\w+);') AS u21
FROM `project.dataset.table`
с выводом
Row id other_cols u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 u15 u16 u17 u18 u19 u20 u21
1 1 abc en bsd undefined us undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined
2 2 xyz en bsd undefined us undefined undefined undefined undefined undefined a b 123 undefined undefined undefined undefined undefined undefined undefined undefined undefined