superset icon indicating copy to clipboard operation
superset copied to clipboard

Caching in SuperSet

Open Asturias-sam opened this issue 6 years ago • 4 comments

I have the following query running in SQL Lab

(SELECT 
        x.a 
        x.b
        y.a
        y.b
   case( logic here )
     ... fetching other attributes from tableX and tableY
   FROM  tableX x
   join tableY y on 
   x.id = y.id  ) AS TEMP_VIEW

Now i will creating charts based on. this query i.e will extract some of the attributes from the above query

For Example :

SuperSet will form the query like this :

Chart 1:
 Select x.a, count(*)
 from TEMP_VIEW
 Group By x.a

Chart 2:
 Select y.a, count(*)
 from TEMP_VIEW
 Group By y.a

// Other Charts and Filter based on TEMP_VIEW Attributes

Since all this charts will on one dashboard how will i make sure that TEMP_VIEW is executed only once when i load the dashboard i.e i don't want to hit my data source for all the charts as the output will be same.

My Current Design is like this :

SuperSet -> Presto -> Big Query

Asturias-sam avatar Jun 04 '20 14:06 Asturias-sam

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

issue-label-bot[bot] avatar Jun 04 '20 14:06 issue-label-bot[bot]

If you have concern around performance / cost around that view, you may want to materialize it. Superset is not a database or compute engine, it can't store the output of your view and summarize against it.

mistercrunch avatar Jun 07 '20 04:06 mistercrunch

Hey we had the same issue. We are storing the results of query in a parquet file and then on that parquet file data, we are firing SQL Queries.

heythere12 avatar Jun 25 '20 11:06 heythere12

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Aug 24 '20 12:08 stale[bot]