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
posta un mese fa123 visualizzazioni
1 Risposta
2
Risposta accettata

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
ESPERTO
con risposta un mese fa
profile picture
ESPERTO
verificato un mese fa
profile pictureAWS
ESPERTO
iBehr
verificato un mese fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande