bvy007 opened a new issue #17302:
URL: https://github.com/apache/superset/issues/17302
I would like to know a way to work with superset in my scenario of creating
a dashboard at work. I have different schemas in a database as shown in
following directory structure:
Database
├── public
│ ├── schema_meta_Info
│ └── Statistics
│
├── DBClient1
│ ├── financial_data
│ ├── customer_data
│ └── Sales_data
│
├── DBClient2
│ ├── financial_data
│ ├── customer_data
│ └── Sales_data
│
├── DBClient3
│ ├── financial_data
│ ├── customer_data
│ └── Sales_data
│
├── DBClient4
│ ├── financial_data
│ ├── customer_data
│ └── Sales_data
**_DBClient_** : Schemas
_**financial_data**_ : financial information of customers in Client
_**customer_data**_ : Customers of Client
_**Sales_data**_ : Sales Information of Client's Customers
And I am trying to create a dynamic SQL query and add it to the dashboard in
superset. For this I am trying to have a chart with drop down(like filter in
superset) option and wanted to select the DBClient (_DBClient1_ (or)
_DBClient2_ (or) _DBClient3_ (or) _DBClient4_). Based on the my selection, I
would like to show my plots with an updated query in the background.
For example _plot1_ in my dashboard wants to have a query like:
`select * from {{SelectedDBClient}}.financial_data;`
and if I had selected DBclient3 as the schema in the drop down plot of the
dashboard, it should update the query of the _plot1_ as following:
`select * from DBclient3 .financial_data;`
Options that I tried:
- Tried using Jinja Templating : I found that this technique tend to work
with values inside the table.
- Tried an option of passing parameter values : This technique is working
in the SQL editor of superset by passing a dictionary of values when starting
superset. But, it should be dependent on drop down selection schema value.
How can I achieve this ??. In my scenario, I had 10000 schemas with same
tables inside. Also assume that I am an admin (Assume no RBAC for the datasets
are needed).
Question 2:
Also I am curious to know how this can be done in multi database scenario
(same conditions applied from Question 1 ) ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]