Ranga B.
Ranga B.

Reputation: 667

How to select a query as datasource in Apache Superset?

I want to select a saved query as datasource in my charts but Superset only displays views and tables as data sources.

What is required to select a query as a datasource?

Upvotes: 6

Views: 13070

Answers (2)

Machine
Machine

Reputation: 113

IDK if it is still relevant but you can query the dataset. This can be very useful when you're doing nested queries. You can do this with the help of jinja templating. make sure you have enabled them in the config file

select * from {{dataset(233)}}

Upvotes: 1

Ana GH
Ana GH

Reputation: 1700

In SQL Lab, after you execute the query, you have an option to visualize the query, and then you are able to create a chart using the query, save it, and use it in a Dashboard once saved. Not very intuitive, I had to look for it too ;-)

Upvotes: 17

Related Questions