Does Athena support SPLIT function?

0

Hi all, Does anyone know if Athena supports a SPLIT function? Are the Athena functions available limited to only those on this page https://docs.aws.amazon.com/athena/latest/ug/functions.html or do they include the functions found in the Trino documentation?

If it is not available, is there any suggested workaround for split function replacements?

AWS
질문됨 한 달 전122회 조회
1개 답변
2
수락된 답변

Athena does not have a built-in SPLIT function. For example, to split a string on commas you could use:

SELECT REGEXP_REPLACE('a,b,c', '[^,]*,([^,]*),?', '\\1') 
FROM table;

Please find the list of all the functions Athena supports here: https://docs.aws.amazon.com/athena/latest/ug/functions.html

profile picture
전문가
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
profile pictureAWS
전문가
iBehr
검토됨 한 달 전

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

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

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

관련 콘텐츠