sqlQuery split string

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

sqlQuery split string

Andres Angel
Hello everyone, 

Following the current available functions https://ci.apache.org/projects/flink/flink-docs-release-1.8/dev/table/functions.html, how could I split a column string by a caracter?

example 

column content : col =a,b,c
query: Select col from tenv
expected return : cola , colb, colc 


thanks 

Reply | Threaded
Open this post in threaded view
|

Re:sqlQuery split string

Haibo Sun
Hi Andres Angel,

At present, there seems to be no such built-in function, and you need to register a user-defined function to do that. You can look at the following document to see how to do.


Best,
Haibo

At 2019-07-25 06:00:53, "Andres Angel" <[hidden email]> wrote:
Hello everyone, 

Following the current available functions https://ci.apache.org/projects/flink/flink-docs-release-1.8/dev/table/functions.html, how could I split a column string by a caracter?

example 

column content : col =a,b,c
query: Select col from tenv
expected return : cola , colb, colc 


thanks