-
Does Logica have direct support for User Defined Functions (UDFs)? I imagine it might be straightforward to use Logical to generate SQL that could be used to implement a UDF with Standard SQL, but I wonder if there is something more direct. I see Custom Aggregation Functions, but it's unclear how powerful that can be. The "as a function of a single positional argument" seems like it might quite restrictive compared to UDFs in SQL or Javascript that take multiple arguments, but as I am still early on the learning curve for Logica I could easily just not yet understand the full capability of custom aggregation functions. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes! Having one argument restriction is only for aggregation functions. Here is an example of some functions:
Running it you'd get:
Please let me know if you have further questions. |
Beta Was this translation helpful? Give feedback.
Yes!
And thanks to your comment I realized that tutorial should be improved to explain functions better.
There is no limit to how many arguments the function has, and arguments can be positional or named, just like with any other predicate.
Having one argument restriction is only for aggregation functions.
Here is an example of some functions:
Running it you'd get: