Creating and configuring API Gateway, Snowflake API Integration and Snowflake External Function
Each CSP has its own unique attributes to create functions and gateways. Snowflake has provided a worksheet that can be used to capture the necessary settings to help organize the setup. You must follow the instructions on the worksheet to create necessary settings in the CSP.
For GCP, refer to Creating External Functions on GCP
The steps are:
Create the GCP Cloud Function.
Create API Gateway in GCP
Create API Integration in Snowflake
Create external function object in Snowflake
For AWS, refer to Creating External Functions on AWS
The steps are:
Create the AWS Lambda Function (should already be done from above)
Create API Gateway in AWS
Create API Integration in Snowflake
Link the API Integration to AWS proxy service
Create external function object in Snowflake
When all the above steps are performed you should see your UDF’s in Snowflake under Routines in the UI.
Here is a sample query using one of the UDF’s.
Sample Query
select email, thales_cts_tokenize(email) as thalesctstokenizedemail from emp_basic;
Output