Athena: FULL JOIN unable to concat columns with array type data

0

I have two tables in Athena, both have the same schema (user_id - a string, items - an array of ASINs). One table records users in Week 1 and the other one in Week 2. Some users in both tables share the same user_id while the rest are different from each other. I want to do a full join of both tables on the user_id while the items should be joint as a new array.

I have the following sql:

with w1 as ( select * from "week1_events" limit 100 ), w2 as ( select * from "week2_events" limit 100 ), w12 as ( select COALESCE(w1.user_id, w2.user_id) as user_id, w1.items as items_left, w2.items as items_right from w1 full join w2 on w1.user_id = w2.user_id ) select user_id, items_left || items_right as items from w12

But "items_left || items_right" always generates empty array.

질문됨 10달 전43회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠