1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
got the solution to this.
-
inner query to extract data from Jason structure.. specific array
-
un nesting both the keys and value pair form the structure. check the syntax
SELECT
DISTINCT m.key AS PROGRAMID,TRIM(UPPER(CAST(m.value AS VARCHAR)))AS PROGRAM
from
(SELECT json_extract(programidudf, '$.MAP') as Program_jason
FROM "tableaureports"."global_udf_parquet" where programidudf is not null)
CROSS JOIN
UNNEST
(
(map_keys(CAST(CAST(Program_jason AS JSON) AS map<varchar,json>))) ,
(map_values(CAST(CAST(Program_jason AS JSON) AS map<varchar,json>)))
)
AS m(key,value)
répondu il y a 5 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a un an