Incubator-superset: How do I join two tables in Superset ? I need to combine the result in order to visualize the data

Created on 25 Nov 2019  Â·  10Comments  Â·  Source: apache/incubator-superset

How do I join two tables in Superset ? I need to combine the result in order to visualize the data

inactive

Most helpful comment

Issue-Label Bot is automatically applying the label #question to this issue, with a confidence of 0.98. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

All 10 comments

Issue-Label Bot is automatically applying the label #question to this issue, with a confidence of 0.98. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

You can use SQL Lab (+new button > SQL Query) to write any sql you want, and then hit the "Explore" button to make a chart from your query.

You may also want to create a view a view in your database and use this view as a datasource. It's effectively the same as the solution above, except the view is stored in the database and can/could be reused outside of Superset

I'm not sure that I understand SQL Lab View correctly. It doesn't create SQL view, right? I checked that in my database, but I didn't find them.
So, why don't you mention about SQL Lab View in FAQ?
https://superset.incubator.apache.org/faq.html#can-i-query-join-multiple-tables-at-one-time

It took me a long time to discover that with a button Vizualize I can create graph from multiple tables. Before that I was sure that I had to create views in SQL to achieve this.

Yes It doesnt create sql view.!!

On Tue, Nov 26, 2019 at 8:46 PM Bartek Michalak notifications@github.com
wrote:

I'm not sure that I understand SQL Lab View correctly. It doesn't create
SQL view, right?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-superset/issues/8645?email_source=notifications&email_token=AL5J2MLOBIWK2T56FSN4VBDQVU4VBA5CNFSM4JRIW572YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFGLU6Q#issuecomment-558676602,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AL5J2MPLMUQNNVDYL3YTELTQVU4VBANCNFSM4JRIW57Q
.

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.

The "Explore" button in SQL Lab is effectively creating a Superset-managed view. The "datasource" object that gets created stores that SQL in its definition, and runs queries against it the same way that it would against a table, but as a subquery.

We did a lot of design work as part of SIP-34 that should make this flow much more clear.

Is this still open? like to work on this since it aligns with a current requirement we are having

Is this still open? like to work on this since it aligns with a current requirement we are having

I don't think we need to do something here. There are 2 options

  • 1 Join in SQL Lab - It will be stored in Superset internal database and the view will not be available outside Superset.
  • 2 Create a view in source database by joining those tables and use the view inside Superset

Number 2 is preffered option mostly as it pushes data prep to Database itself and make it available for other BI platforms too.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fly-high-bj picture fly-high-bj  Â·  3Comments

gbrian picture gbrian  Â·  3Comments

lenguyenthedat picture lenguyenthedat  Â·  3Comments

thoralf-gutierrez picture thoralf-gutierrez  Â·  3Comments

kalimuthu123 picture kalimuthu123  Â·  3Comments