appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
33.9k stars 3.66k forks source link

[Feature]: Override database host per Query #18646

Open felix-appsmith opened 1 year ago

felix-appsmith commented 1 year ago

Is there an existing issue for this?

Summary

This feature is somewhat simple, but it is powerful. Basically, what you should be able to do is being able to overwrite a host, so it would be more dynamic.

We have 100 databases with the same tables but with different information. Currently, we would need to add 100 queries to be able to run a query for each of them. What this request proposes is to be able to overwrite the hosts so that they are more dynamic.

I put an example below where {{selectServer.value}}.would have the possibility to overwrite the host to obtain the data from different data sources, creating only one data source and one query.

image

Why should this be worked on?

This feature is really something very important for optimizing Appsmith as a platform, as it would save many development hours for our users who have many databases by being able to write 1 query and a single data source with the option to overwrite the host, the user will avoid creating 100 data sources and 100 different queries.

User conversation Thread: https://discord.com/channels/725602949748752515/1047549492846665859

Internal Slack Thread: https://theappsmith.slack.com/archives/CNQ9Q91C0/p1669887172107739

Front logo Front conversations

Sonorpearl commented 1 year ago

We struggle with the described missing feature. We have multiple servers set up in different locations and regions & different deployed instances. We deploy our app with the same database & API on multiple instances (around 85) and with the API we can just on the fly change the request URL but with queries, we would need to setup 85 database sources and if we have like 10 queries since a query is strictly bound to a specific database host, we would need to replicate them to 850 (85 database sources x 10 queries = 850) queries, which is insane.

Other tools like Retool, Budibase and many more tools just implement an override option of at least the host (some other tools also allow to override the database port and database name, but most don't) within each query run, to just fetch the value out of some select, input or stored value, basically what {{}} is for. If the host is malformed or not reachable it's just the same as if the right now connected db host would be gone, just throw the exception the same way. Here is an example from Retool: image

Sonorpearl commented 1 year ago

Any updates? We really need this feature.

Sonorpearl commented 1 year ago

Updates please? :-)

sribalajig commented 1 year ago

@Sonorpearl I am from Appsmith product team. This is definitely on our radar so it would be great if you could talk about your use case. Would you be open to having a conversation about this? You can find a slot on my calendar here.

Sonorpearl commented 1 year ago

@sribalajig The above-mentioned case by @felix-appsmith is our use case.

sribalajig commented 1 year ago

@Sonorpearl at the moment, our focus is to get the our existing integrations in shape, which would ensure that the basic functionalities of connecting to and querying datasources work without flaws. What you are suggesting is for datasources to be more "dynamic", i.e, the properties of a datasources can be modified at run time. While this is certainly useful, it is an advanced piece functionality which we plan to support in the future but not at the moment.

Sonorpearl commented 1 year ago

We were told that it should happen in Q1 or latest in Q2 of 2023 back in the day, otherwise, our company soon will have to look for another solution from the many competitors that already support this. But we would love to use appsmith, but without this feature, we have no other choice.

BFS-JWesseler commented 8 months ago

Any update on this?

Nikhil-Nandagopal commented 8 months ago

@BFS-JWesseler we've unfortunately deprioritized this for now. We will try and pick it up in the following months.

saivikash1522 commented 2 months ago

Hi Guys, We are having multiple data sources of mysql for each env with same table names, we would want the feature to dynamically update the data sources, instead of us going and configuring the data source and assign the data source to the queries each and every time. This is a lot time consuming and assigning the data sources manually to each query based on the environment is not possible as we have 100s of queries in our apps. Whenever we fork a the app to the new workspace, we need to configure the data source all the times, if we have like 100 data sources, configuring them itself will take hours, that is time waste. Please add this feature as it would help a lot of customers.

Nikhil-Nandagopal commented 2 months ago

@saivikash1522 I'd like to understand a bit more about your setup. Would you be open to a quick 30min call? This is my Calendly below https://calendly.com/appsmith-nikhil/30min?month=2024-05

saivikash1522 commented 2 months ago

Hi Nikhil, can we have a call now?