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.
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).
js
libraryI 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:
@google-cloud/kms
library.package.json
scripts.