将JSON的档案转换成一栏,但一栏Im无法读到,其价值并不大。
CREATE OR REPLACE TEMPORARY TABLE SAMPLE_J
(
SAMPLE_JSON VARCHAR(100)
);
INSERT INTO SAMPLE_J
(SAMPLE_JSON)
VALUES ( 页: 1"ident":["Product:Tires","sender_id:12345","sender_name:John Who","Tire_Condition:New"注iii
--this is my query
SELECT
SAMPLE_JSON,
JSON_EXTRACT_PATH_TEXT(SAMPLE_JSON, Product ) as test1,
JSON_EXTRACT_PATH_TEXT(SAMPLE_JSON, Product[0注.Product ) as test2
FROM SAMPLE_J;
the result is null for test 1 and test 2
这就是JSON档案如何看待:
页: 1
“身份”:
"Product:Tires",
"sender_id:12345",
"sender_name:John Who",
"Tire_Condition:New"
注
iii