Category: JavaScript
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Trying to query Trino (newer Presto)

Issue

I am trying to connect to Trino database using API since direct connectivity is not supported. I am using POST query request and GET nextUri from the response. However, I am not able to fetch data directly as the JS function doesn't allow it. I tried passing nextUri via store, but it still doesn't work. I am looking for a solution to this issue. Can anyone help?

Resolution

As Trino db connectivity is not supported, the user is trying to build it using API. The process for querying Trino requires a POST query request, which usually responds with a status of QUEUED and a nextUri. The user then needs to GET the nextUri to receive a response with the status of QUEUED, FAILED, RUNNING or FINISHED. Once all data pages are received, the query is complete.

The user has tried to use two API calls, apiPOST and apiGET, passing the nextUri via store, but has not been successful. They are asking if anyone has been able to achieve this and for assistance in resolving their issue.

In response, a suggestion is made to provide a screen recording or share the app with support@appsmith.com so that the app's code and configuration can be reviewed. This will help to identify any potential issues with the implementation.