Ways to Send Snowflake Data to a REST API (POST)

Viewed 402

I was wondering if anyone has sent data from Snowflake to an API (POST Request).

What is the best way to do that? Thinking of using Snowflake to unload (COPY INTO) Azure blob storage then creating a script to send that data to an API. Or I could just use the Snowflake API directly all within a script and avoid blob storage.

Curious about what other people have done.

1 Answers

To send data to an API you will need to have a script running outside of Snowflake.

Then with Snowflake external functions you can trigger that script from within Snowflake - and you can send parameters to it too.

I did something similar here:

The basic steps on that post are:

  1. Have a script that runs Facebook Prophet inside a container that runs on Cloud Run.
  2. Set up a Snowflake external function that calls the GCP proxy that calls that script with the parameters I need.

In your case I would look for a similar setup, with the script running within Azure.

Related