3

In answer to a github ticket regarding UDF of clickhouse, they answered in 2017 that UDF can't be created in clickhouse. I want to know Is there any way to do it now in 2020?

MAYANK BHARTI
  • 73
  • 2
  • 11
  • 2
    At this moment UDF (user-defined functions) have not supported - see the reasons and actual discussions about it [UDF support #11](https://github.com/ClickHouse/ClickHouse/issues/11). – vladimir Jun 25 '20 at 22:25
  • 1
    One workaround is to use executable dictionary source https://clickhouse.tech/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources/#dicts-external_dicts_dict_sources-executable. It is available since 21.3 release. You can create executable file, and call it as dictionary. – ice Mar 31 '21 at 11:26
  • + look at this one https://stackoverflow.com/questions/71236415/how-to-send-multiple-arguments-to-executable-udf-in-clickhouse – vladimir Jul 24 '22 at 22:01

1 Answers1

5

UDFs for ClickHouse came in September, 2021. There are two PRs introducing UDFs:

As a presentation from 2021 says, ClickHouse team considers five ways to define a UDF. One of alternative ways mentioned in an older presentation is a cache dictionary with an executable source.

Anton Bryzgalov
  • 1,065
  • 12
  • 23