Cannot use a custom function in Query JSON with SQL

Hi there,

In my workflow I developed a small function called "get_domain".
I used it in a Retool database query without a problem.
Now I want to use that function in a "Query JSON with SQL".
However I get this error: "alasql.fn.get_domain is not a function".
Can anybody help me here?
Does alaSQL support custom functions?

kind regards

alaSQL does have some limitations AFAIK but check this out

Does anyone have experience with such a function and its syntax?

I am sure that if you share your query someone here can assist but more information is needed.

This is the query (Query JSON with SQL) I'm talking about.
It's a query in my workflow.

get_domain(Referrer) as domain,
from {{ }};

ScanDD is a scan on a DynamoDB database.
get_domain is a function I defined in the workflow:

When I run the query I get this error: "alasql.fn.get_domain is not a function".
I used the same function in a different query on a Postgres database without a problem.

Any idea how to solve this?


Hello! It sounds like you're maybe trying to call a function ( in your Query JSON with SQL block, is that correct? If so, this actually isn't supported—functions can only be called with JS blocks.

Correct Victoria.
It's clear.
Thank you.

Wonderful, happy to hear that! Let us know if we can help with anything else going forward.