How can I serve data to a public React dashboard?

I’m working on a project that publishes data to the general public. Right now, we’re manually updating a simple CSV file, which is then used to populate a dashboard. We’re planning to build the dashboard using React in AWS/Azure, and I’m exploring better ways to automate and serve the data.

I did find that I can use ODBC to egress data but this requires me using my personal token which seems like a security risk.

What would be the best way to utilise data in Foundry, but have a dashboard that is not hosted by Foundry?

Your best bet is to export the data to AWS, e.g. a S3 bucket.
Another alternative is to have a dedicated backend / lambda deployed in AWS as Proxy. That component could have your token and call one of the foundry APIs to retrieve the data.

Let me know if you need more specific help in one or the other direction.

1 Like

Thanks Nicornk. How would I go about exporting data to an s3 bucket?

https://palantir.com/docs/foundry/data-connection/export-overview/

You can use File Exports with a S3 Source.

Hi @hgo,

What would be the best way to utilise data in Foundry, but have a dashboard that is not hosted by Foundry?

Our primary answer to this question is the Ontology SDK (OSDK) – that’s exactly what it is intended for! However, given you’ve said this dashboard will publish data to the general public, I assume you don’t want/need users to authenticate before they can access the data? And typically, a purely frontend OSDK app would require that.

If you are able to include a backend service in your architecture, then you could have that service leverage OSDK and authenticate with Foundry using the OAuth 2.0 Client Credentials flow (which is an option you can select when creating the application in Foundry’s Developer Console). The service can then surface relevant data to your dashboard.

OSDKs can be generated in Python and Java, as well as TypeScript, giving you various options for how you write the backend service.

1 Like

This was the second option I was hinting towards.

Just make sure you add Rate limiting and/or caching to your backend to avoid surprises due to the ontology query compute billing