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

Unable to find module in theta_sketch.mjs for theta_sketch_int64 #453

Open
sohamsilpg opened this issue Sep 23, 2024 · 2 comments
Open

Unable to find module in theta_sketch.mjs for theta_sketch_int64 #453

sohamsilpg opened this issue Sep 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sohamsilpg
Copy link

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

@afleisc afleisc added the bug Something isn't working label Oct 1, 2024
@danieldeleo
Copy link
Collaborator

danieldeleo commented Oct 15, 2024

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}

@sohamsilpg
Copy link
Author

sohamsilpg commented Dec 16, 2024

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.
    theta_sketch_1
    theta_sketch_1_1

  • If I use gs:// in front of the bucket name then I get an error saying Module not found. Please check below screenshots.
    theta_sketch_2
    theta_sketch_2_1

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants