Query mode for SQL database

Feature(s) impacted

Chart in dashboard defined with SQL (query mode)

Observed behavior

My database is PostgreSQL and I don’t see the Query option to define my chart with SQL.

Expected behavior

I’m expecting to have the Query option to define my chart for a PostgreSQL database.

Context

  • Project name: smappen
  • Team name: operations
  • Environment name: Development | anneclairegerard
  • Agent technology: nodejs
  • Agent (forest package) name & version: @forestadmin/agent 1.53.1
  • Database type: postgresql
  • Recent changes made on your end if any: I’m migrating the forest agent (we area currently using the forest-express-sequelize in version 9.0.0). I am trying to migrate some charts in a dashboard. Previously, in the chart, we had the option to define a Query :

    But using the forestadmin/agent, I do not have this option:

I understand reading the documentation (Create a chart | User Guide) that the Query mode is available for SQL databases, so I should be able to define one.

Is there something else to configure to have the Query mode ?

Hello @Anne-Claire_Gerard

Currently, Live Query is not available with @forestadmin/agent-nodejs, It is planned to be reintroduced in a future version of the agent, but unfortunately, we don’t have a specific timeline for it yet.

In the meantime, if you want to create a chart based on SQL, a workaround with @forestadmin/agent-nodejs, is to use an API Chart. You can find detailed instructions on how to do this here: Live Query Charts | Node.js Developer Guide

Best regards,
Anthony

2 Likes

Thank you Anthony for your answer.
The chart is defined in a workspace and uses another input field (email) defined in the workspace. This email is then used in a where clause in the SQL query ({{email.selectedRecord.Subscription.id}}).
How can I do this with an API Chart ?

Best Regards,
Anne-Claire

Hello @Anne-Claire_Gerard,

Unfortunately, the API Chart does not currently support retrieving values from other fields in the workspace. However, I’ll share this with the team as a feature request.

Best Regards,
Anthony