[SQL] split & get array index 0
### Spark SQL
SELECT split('asdf#DDD#1234', '#DDD#')[0]; // asdf;
### Presto
SELECT element_at(split('asdf#DDD#1234', '#DDD#'), 1); //asdf
https://www.tutorialspoint.com/apache_presto/apache_presto_element_at.htm
Apache Presto - element_at(array,index) - Tutorialspoint
Apache Presto - element_at(array,index) Advertisements Query 1 presto:default> select array_intersect(array[1,2,3],array[2,4]) as intersection; Result intersection -------------- [2] Query 2 presto:default> select element_at(array[1,2,3],2) as element_posi
www.tutorialspoint.com
https://stackoverflow.com/questions/36200090/how-to-split-a-column
How to split a column?
I would like to see if I can split a column in spark dataframes. Like this, Select employee, split(department,"_") from Employee
stackoverflow.com
https://prestodb.io/docs/current/functions/string.html
7.9. String Functions and Operators — Presto 0.232 Documentation
Splits string by entryDelimiter and keyValueDelimiter and returns a map. entryDelimiter splits string into key-value pairs. keyValueDelimiter splits each pair into key and value. Note that entryDelimiter and keyValueDelimiter are interpreted literally, i.e
prestodb.io