I’ll add a little more colour to what Vinod mentioned.
Appsmith’s backend system currently doesn’t store any information about the dynamic variables or the response data. It acts as a pure proxy system. This is to ensure that any private/confidential data is never logged or stored in Appsmith’s data stores. Hence, as a user, if you define a dynamic variable in your query, the frontend client evaluates these variables and sends them to the backend API server to perform the actual execution.
The Appsmith server only stores the configuration of the actions so that the SQL query body or custom API URLs are never exposed to the client in “view” mode. This protects the application as well since viewers cannot deduce the actual query being executed.
Hope this gives you a slightly better idea about the data model and why it is currently so.