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
質問済み 1ヶ月前121ビュー
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
エキスパート
回答済み 1ヶ月前
profile picture
エキスパート
レビュー済み 1ヶ月前
profile pictureAWS
エキスパート
iBehr
レビュー済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ