Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDF Functions #4

Open
lmangani opened this issue Aug 6, 2023 · 0 comments
Open

UDF Functions #4

lmangani opened this issue Aug 6, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@lmangani
Copy link
Contributor

lmangani commented Aug 6, 2023

The upcoming releases of ClickHouse allow correct allocation of UDF resources with two new parameters:

  • user_scripts_path
  • user_defined_executable_functions_config
#!/usr/bin/env bash

set -e

CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh

SCRIPTS_DIR=$CUR_DIR/scripts_udf

$CLICKHOUSE_LOCAL -q 'select test_function()' -- --user_scripts_path=$SCRIPTS_DIR --user_defined_executable_functions_config=$SCRIPTS_DIR/function.xml

This will finally allow using the execute binary UDF functions in chDB:

SELECT * FROM executable('./some_script.py', TabSeparated, 'name String', (SELECT name));

Todo

@lmangani lmangani added enhancement New feature or request help wanted Extra attention is needed labels Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant