https://linen.dev logo
Title
n

NKorade

05/24/2023, 9:52 PM
Hi All, we are looking fro a way to fetch the list of all the function supported by Druid SQL. Is there an API that would return this? Otherwise, what would be the best way to get this list? Would appreciate any help. Thanks
a

Abhishek Balaji Radhakrishnan

05/24/2023, 11:32 PM
hi @NKorade! I’m looking into the same usecase as well. Currently there’s no API in Druid that provides you with all the types and function information. We’re thinking it’d be nice to store the information in the sys table/INFORMATION_SCHEMA and make it available via the SQL query interface. I will open a GitHub proposal soon and link it here when it’s ready. Thanks for asking!
v

Vadim

05/25/2023, 12:04 AM
I wish. This would be super helpful to the web console
currently the console has a script that scrapes the docs
.md
files to locate all the functions at compile time https://github.com/apache/druid/blob/f6a0888bc07396a4afab91f5cb576793e26275d2/web-console/script/create-sql-docs.js#L66
it would be soooo cool if it could instead query for them at runtime as well as any functions added by extensions
a

Abhishek Balaji Radhakrishnan

05/25/2023, 12:06 AM
yep! coming soon 🚀
“tell me about all the types and Druid operators in my cluster” even if I have custom things loaded through an extension
n

NKorade

05/25/2023, 12:07 AM
Thanks @Abhishek Balaji Radhakrishnan @Vadim Our use case is something similar. We have own custom web query editor where we would like to provide auto-completion support for functions that are available. This will help a lot. Would it make it to 0.26 by any chance?
a

Abhishek Balaji Radhakrishnan

05/25/2023, 12:07 AM
The 26.0 release is already out, so sadly has to be in the next one 🙂
v

Vadim

05/25/2023, 12:07 AM
Druid 26 is already released.... so no
@NKorade , for now, you might make use of the file I linked (or the file it generates)
Untitled
n

NKorade

05/25/2023, 12:12 AM
Thanks a lot @Vadim, this is helpful while we await the API. Appreciate it!
a

Abhishek Balaji Radhakrishnan

05/29/2023, 4:27 AM
I opened a GitHub issue to expose Druid functions. Let me know if you’ve any questions or feedback: https://github.com/apache/druid/issues/14346. Thanks!