This content has been marked as final.
Show 7 replies
-
1. Re: array type with user defined functions
rareddy Nov 6, 2015 9:38 AM (in response to jietao)Use "string[]" as datatype
-
2. Re: array type with user defined functions
jietao Nov 6, 2015 11:32 AM (in response to rareddy)in the wizard for UDF creation, I can only choose the data type listed by Teiid designer. There is no data type string [].
-
3. Re: array type with user defined functions
rareddy Nov 6, 2015 11:44 AM (in response to jietao)See if you can edit it after the wizard completes. You can also log a Designer JIRA for the bug.
Ramesh.. -
4. Re: array type with user defined functions
asmigala Nov 9, 2015 2:59 AM (in response to jietao)jietao, there is already a feature request reported: [TEIIDDES-2621] Support for array datatype - JBoss Issue Tracker
-
5. Re: array type with user defined functions
jietao Nov 9, 2015 8:23 AM (in response to asmigala)thx
-
6. Re: array type with user defined functions
asmigala Nov 10, 2015 5:20 AM (in response to jietao)jietao as a workaround, you can model your return parameter as object datatype and then convert in the queries, or use arraytable
public static String[] splitString(String s){ return s.split(" "); }
SELECT CONVERT(c1, string[]) FROM t1 SELECT ARRAY_GET(c1, 1) FROM t1 SELECT x.* FROM t1, ARRAYTABLE(t1.c1 COLUMNS v1 string, v2 string, v3 string, v4 string) x
-
7. Re: array type with user defined functions
jietao Nov 12, 2015 8:03 AM (in response to asmigala)thx. it works!
Jie