User Defined Functions

Register the UDF

Create a file with the compute and memory requirements for the UDF.

cat >
"vcpus": 4,
"memory": 4096

Register the UDF with Datacoral for it to become available in transformations.

AWS_PROFILE=<datacoral_aws_profile> # Needed only if you have multiple AWS CLI profiles
datacoral organize udf-create \
--udf-name <udf_name> \
--module-path /path/to/ \
--language Python \
--resources /path/to/compute-resources.json

Note: AWS_PROFILE is AWS CLI profile name for the AWS account where Datacoral is installed. If your default AWS profile is the right one, you dont have to specify it. AWS_PROFILE is needed since the UDF zip file is being uploaded to S3.

List all registered UDFs

datacoral organize udf-list

Delete a materialized view which has a UDF

datacoral organize matview-delete --matview-schema <schema_name> --matview-name <mv_name> --slice-name batchcompute

Note: --slice-name batchcompute is mandatory

Delete a UDF

datacoral organize udf-delete --udf-name <udf_name>