Hi. Is it possible to create a Flink UDF that take...
# troubleshooting
v
Hi. Is it possible to create a Flink UDF that takes in a datatype as an argument? We are trying to create an equivalent to
CONVERT
in SQL Server in Flink. Example
CONVERT(VARCHAR(8), id, 2)
k
Copy code
public class CONVERT extends ScalarFunction {
    public String eval(String s1,String s2) { //whatever argument you want to give
        //Your logic;
    }
}
v
But
VARCHAR(8)
isn't a string? @Keyur Makwana
k
I am not sure but I think this should work as Varchar is of type string