Hi all,
I needed to call a typescript foundry function from streaming pipeline in pipeline builder, which isn’t a core feature at the moment, so I wanted to share my temporary workaround and see if anyone else has done anything similar. My setup is as follows:
- Created my typescript foundry function in Code Repos
- Created a foundry action, which called my typescript foundry function
- Created a python UDF, which used foundry API to call my action
- In pipeline builder, created a streaming pipeline, and used the stream fields as input for my python UDF, which called my foundry action, which then triggers my typescript foundry function
For implementing step 3, here are some docs I found useful:
Get Action Type docs (to get the format of the payload to be used): https://www.palantir.com/docs/foundry/api/v1/ontology-resources/action-types/get-action-type/
Apply Action (to actually run the action): https://www.palantir.com/docs/foundry/api/v1/ontology-resources/actions/apply-action/