Hi guys, I have a postgresql table connected to my retool app. I wanted to start streaming data - ie. whenever a new row is added my frontend automatically updates. How can I achieve this, I can't seem so see the data streaming option in the query editor.
Hi @fahed_arshad! Welcome back to the community.
I don't think there's a good solution for this problem, unfortunately. The data streaming option that you're referencing enables a different type of streaming. Specifically, it allows certain resource queries to incrementally return data instead of waiting to return it all at once. This option is currently locked behind a feature flag but I can enable it for your org, if you think it would be useful.
As far as actual solutions are concerned, it's probably easiest to set up polling and just refresh your query at some specified frequency:
One more technical solution would be building a custom component that listens for external pings via websocket and re-triggers the query only when needed.
I hope that helps! Or at least clarifies the problem and potential solutions. Let me know if you have any follow-up questions.