Unable to find module in theta_sketch.mjs for theta_sketch_int64
Hello,
I have generated the theta_sketch.mjs file using make command and used the following script to create theta_sketch_int64 UDF.
https://github.com/GoogleCloudPlatform/bigquery-utils/blob/master/udfs/community/theta_sketch_int64.sqlx
However, I am getting the following error while invoking the theta_sketch_int64 UDF in BigQuery.
TypeError: Module._clamp_lg_k is not a function at theta_sketch_test.theta_sketch_int64(INT64, INT64) line 56, columns 16-17
Looking for assistance to resolve this issue.
Thanks
Can you please detail the exact steps you took to deploy the UDF?
The build process in this repo does the following within the udfs/datasketches/ directory:
git clone https://github.com/apache/datasketches-cpp.git
for dir in kll-sketch theta-sketch tuple-sketch; do
cd $dir && make clean && make all
cd ..
done
and then you have to copy the js_builds/* directory into your own specified ${_JS_BUCKET}
Hi @danieldeleo , Thanks for the suggestion. I ran the build process by following the instructions in the repo and the UDFs got created in my project. However, I am facing the following issues while using the UDFs.
-
If I only use the bucket name, then I am getting a message saying Access Denied. Please check below screenshots.
-
If I use gs:// in front of the bucket name then I get an error saying Module not found. Please check below screenshots.
Can you please help me to understand which option is correct and how to resolve the issue? FYI, the bucket is created in location : us (multiple regions in United States), same as the dataset.