I need to run a query by spark, but I'm not getting it. I tried using the explode command, but the performance is very bad.
How can I browse the struct field by spark?
I would like to run totally on spark dataframe and I must run it in AWS Glue.
Thanks.
#standardSQL
SELECT
visitNumber,
visitId,
fullVisitorId,
hits.screenname,
dim.value
FROM
table,
UNNEST(hits) AS hits,
UNNEST(customDimensions) AS dim
LIMIT
10;
I tried using the explode command, but the performance is very bad.