Is it possible to create Slice from two tables?

75 views
Skip to first unread message

Yu Wang

unread,
May 31, 2017, 1:37:25 AM5/31/17
to airbnb_superset
Currently in GUI, we can only select 1 table when creating Slice. I was wondering if it's possible to create Slice from two tables.
Or maybe it's only possible through sqlab?

Nitin Dhawan

unread,
May 31, 2017, 1:51:13 AM5/31/17
to Yu Wang, airbnb_superset
Hi Yu,

I am a novice. Here are two useful ways I know to accomplish the same.

Method 1) Create a database view and then import it in tables. Then create a slice, All subsequent queries from slice will be against this view.
QUERY EXAMPLE: create or replace view my_joined_table_view AS (select a.*, b.* from a join b ...);

Method 2) SQLlab query -> Then Visualize. This will add the query as a table. You can add more slices on this tables. All subsequent queries from slices will be against this query.
QUERY EXAMPLE: select a.*, b.* from a join b ... ; 

Cheers,
-Nitin Dhawan



On Wed, May 31, 2017 at 11:07 AM Yu Wang <nicola...@gmail.com> wrote:
Currently in GUI, we can only select 1 table when creating Slice. I was wondering if it's possible to create Slice from two tables.
Or maybe it's only possible through sqlab?

--
You received this message because you are subscribed to the Google Groups "airbnb_superset" group.
To unsubscribe from this group and stop receiving emails from it, send an email to airbnb_supers...@googlegroups.com.
To post to this group, send email to airbnb_...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/airbnb_superset/db188906-f883-44c7-a01a-34ddfd4fd27d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Yu Wang

unread,
May 31, 2017, 2:32:02 AM5/31/17
to airbnb_superset
Thanks a lot. You're right. I should be able to create a table view and then use it. I'm not an expert in SQL so it's always out of my mind...


On Wednesday, May 31, 2017 at 1:51:13 PM UTC+8, Nitin Dhawan wrote:
Hi Yu,

I am a novice. Here are two useful ways I know to accomplish the same.

Method 1) Create a database view and then import it in tables. Then create a slice, All subsequent queries from slice will be against this view.
QUERY EXAMPLE: create or replace view my_joined_table_view AS (select a.*, b.* from a join b ...);

Method 2) SQLlab query -> Then Visualize. This will add the query as a table. You can add more slices on this tables. All subsequent queries from slices will be against this query.
QUERY EXAMPLE: select a.*, b.* from a join b ... ; 

Cheers,
-Nitin Dhawan



On Wed, May 31, 2017 at 11:07 AM Yu Wang <nicola...@gmail.com> wrote:
Currently in GUI, we can only select 1 table when creating Slice. I was wondering if it's possible to create Slice from two tables.
Or maybe it's only possible through sqlab?

--
You received this message because you are subscribed to the Google Groups "airbnb_superset" group.
To unsubscribe from this group and stop receiving emails from it, send an email to airbnb_superset+unsubscribe@googlegroups.com.
To post to this group, send email to airbnb_superset@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages