You can access AirOps Apps directly in Snowflake by creating a Snowflake External Function.

The below steps walk through creating and running a Snowflake External Function to access any AirOps App. If you have any questions, just reach out to us!

1. Create the API Integration in Snowflake

First, you must create an API connection between Snowflake and AirOps. To do so, run the below statement in Snowflake with ACCOUNT_ADMIN permissions.

create or replace api integration AIROPS_API_INTEGRATION
api_provider = aws_api_gateway
api_aws_role_arn = 'arn:aws:iam::843219976259:role/rails_app_api_gateway'
api_allowed_prefixes = ('<https://x4xrin77vf.execute-api.us-east-1.amazonaws.com/production>')
enabled = true;

More information about Snowflake API integrations can be found here.

2. Create the External Function

Secondly you must create a function for each App you wish you use in Snowflake. When running the CREATE command to create a new function, you’ll add the bearer token for authentication, identify the data app ID, give it a name, and run the command. The function can be given any name, but we recommend including “AIROPS” so it is easily identifiable (e.g. AIROPS_SENTIMENT_ANALYZE)

a. Find your workspace Bearer token

AirOps API requests require authentication using your workspace Bearer token that forms part of the request. You can find your token by navigating to ⚙️Settings → Workspace.

Screen Shot 2023-03-09 at 2.00.03 PM.png

You will need the bearer token to create the External Function - the bearer token should be in the following format: Bearer YOUR_API_KEY

b. Get the App ID you wish to run

You will also use your App ID during the Create External Function step. The App ID is the number found at the end of the app's URL.

Untitled