Ниже должно работать
#standardSQL
SELECT
ARRAY(
SELECT
STRUCT(
CAST(JSON_EXTRACT_SCALAR(split_items, '$.index') AS int64) AS index,
TIMESTAMP_MILLIS(CAST(JSON_EXTRACT_SCALAR(split_items, '$.startTime') AS int64)) AS startTime
)
FROM (
SELECT CONCAT('{', REGEXP_REPLACE(split_items, r'\[{|}\]', ''), '}') AS split_items
FROM UNNEST(SPLIT(json, '},{')) AS split_items
)
) AS split_items
FROM `dataset.table`
«Исправление» находится под строкой
REGEXP_REPLACE(split_items, r'\[{|}\]', '')
Вы можете протестировать / поиграть с ним, используя ваш пример json, как показано ниже
#standardSQL
WITH `dataset.table` AS (
SELECT '[{"index":0,"startTime":1524607204000},{"index":1,"startTime":1524607204000},{"index":2,"startTime":1524607204000}]' AS json
)
SELECT
ARRAY(
SELECT
STRUCT(
CAST(JSON_EXTRACT_SCALAR(split_items, '$.index') AS int64) AS index,
TIMESTAMP_MILLIS(CAST(JSON_EXTRACT_SCALAR(split_items, '$.startTime') AS int64)) AS startTime
)
FROM (
SELECT CONCAT('{', REGEXP_REPLACE(split_items, r'\[{|}\]', ''), '}') AS split_items
FROM UNNEST(SPLIT(json, '},{')) AS split_items
)
) AS split_items
FROM `dataset.table`
с результатом как
Row split_items.index split_items.startTime
1 0 2018-04-24 22:00:04.000 UTC
1 2018-04-24 22:00:04.000 UTC
2 2018-04-24 22:00:04.000 UTC