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
demandé il y a un mois121 vues
1 réponse
2
Réponse acceptée

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
EXPERT
répondu il y a un mois
profile picture
EXPERT
vérifié il y a un mois
profile pictureAWS
EXPERT
iBehr
vérifié il y a un mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions