Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

294
Views
How to use @google-cloud/kms in BigQuery UDF function

sorry if the question is obvious - I have almost zero experience with js. The general question is how to use @google-cloud/kms in the BigQuery UDF - I suppose it's requred to pack it, so the real question is how to pack @google-cloud/kms library.

A bit of history

We use BigQuery table to store encrypted data. The data is encrypted with the custom key created in the GCP kms. We have to expose some data to the external users via the view - this solution would enables the data decryption in a flow by the UDF js function included in the view definition. There is existing KeyManagementServiceClient class from the @google-cloud/kms js library created for such purposes (simillar package exists for the Python also).

Packaging js library

I know, that the requirement for the BigQuery js function is to package and include library in the GCP bucket (an official documentation: https://cloud.google.com/bigquery/docs/reference/standard-sql/user-defined-functions#including-javascript-libraries). The question is how to pack the @google-cloud/kms library into the single js file to enable importing in the BigQuery udf function?

I have already try to find some information here, unfortunatelly without success:

  • using the webpack (https://medium.com/swlh/how-to-package-a-javascript-library-for-use-in-bigquery-2bf91061f66f) - but it doesn't work straight-forward with the @google-cloud/kms library.
  • node-kms Github repository (https://github.com/googleapis/nodejs-kms) - I have not found any apropriate information in the Readme nor no ready webpack building script included in the package.json scripts.
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!