Skip to content

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

Open

Description

@sohamsilpg

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

Activity

  1. danieldeleo commented on Oct 15, 2024

    @danieldeleo
    Collaborator

    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}

  2. sohamsilpg commented on Dec 16, 2024

    @sohamsilpg
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions