Can we receive webhooks from Foundry when a dataset updates?

Viewed 54

Can Foundry we receive Webhook calls to an arbitrary external endpoint when a dataset updates (e.g. new transaction committed, or jobspec updated)?

1 Answers

I checked around and couldn't find any hooks, maybe there is something at actions level, but that is downstream from transactions.

Alternatively you can workaround it by having a downstream transform that just exists to build once upstream has transactions, and use it to make said http requests from your transforms via the driver. I understand it's not the same as you requested, but it's the best workaround I can think of.

You'll have to request via your support to have whatever endpoint you want white listed within Foundry Configuration. This will likely have to be applied by Palantir, and it will raise security questions, so you should reach out internally via your support mechanisms.

Once you do that, something like this should work.

import requests

@transform_df(
   _noop_df=Input("your upstream"),
   Output("output dataset"))
def transform(_noop_df):
   req = requests.Request('POST','http://stackoverflow.com',headers={'X-Custom':'Test'},data='a=1&b=2')
   # write the result of the request into the output if you want.

Related