Webapp applications
I have a table in my database (BigQuery) which contains products and product information, I would like to provide a business facing interface where a user could enter a products ID and see all the information on this product, I am thinking a webapp would be a good fit, am I on the right track?
Is it possible to have a webapp dynamically run a database query, based on a user input, then visualise the results? If not, I could read the whole source table in as a dataset, in which case is it possible to filter this table and return results based on a users input?
If both would work, which would be the easiest?
Thanks,
Ben
Answers
-
Hi @ben_p
I personally like decoupling services, this allows me later to update, upgrade or fix without it becoming too spaghetti-ish.
In this case, I would separate the concern of the webapp:
- present some UI for input
- fetch results
- present results
from the concern of the actual fetching, which could be done by an SQL lookup endpoint in the API node.
If you don't want to use the API node, then the alternative could be to either inside webapp or project library have a method that:
- constructs a SQL query given a parameter
- invokes the dataiku's sql_query to fetch results
- format results in order for the webapp to consume and/or present as is.
As you can see the API node takes care of most of the steps above when it comes to retrieving the information, you may choose to reformat the results, but they're already in a nice format as well
I hope this helps!