Virtual connections: New in Tableau 2021.4
Virtual connections are basically the dream connection you could possibly create with Tableau.
- Virtual connections are a brand-new Tableau asset (not a published data source) that require the Data Management add-on and let you centralise connections, policies and row level security on server.
- When saving, the Save button only stores a draft while Publish actually commits the connection and makes it available to users.
- You can include multiple tables, use custom SQL, set live or extract per connection, and toggle table visibility to hide or show tables temporarily.
- To connect from Desktop you must point to Tableau Server and pick the virtual connection from the dropdown; the server then delegates the live connection through to Snowflake.
- The connection appears with a standard database icon rather than a server icon, which makes debugging confusing since edits must be made on the server.
0:00Hey, it's Tim here. In 21.4 Tableau have
0:02brought along two features, virtual
0:04connections and
0:05centralized row level security. In this
0:07video, I'm going to touch on virtual
0:09connections.
0:09Centralized row level security is a topic
0:11of its own. So I'll cover that in the next
0:14video
0:14after this one. Now, the great thing about
0:17this is it allows you to create a
0:19connection on server
0:20that you can then democratize through your
0:23organization. It works very similar to
0:25something
0:25like a published data source except for
0:26this is nothing like a published data
0:28source. This is its
0:29own thing, its own completely different
0:31type of asset in Tableau. And it allows you
0:34to essentially
0:34create a connections and apply row level
0:37security to it and policies as well to it
0:39and then move
0:40that onto a folder or project, put it in a
0:42collection, connect to it in desktop, set
0:45it up
0:46in a web edit video. It's basically the
0:48dream connection you could possibly create
0:51with Tableau.
0:52It does require the data management add on,
0:54but nonetheless, let's find out how this
0:56works. So
0:57I'm going to go here to the new button here
0:58and you'll see that the option there is
1:00virtual
1:00connections. When we do that, it does open
1:02it in a new window for me. So I'll bring it
1:04onto screen
1:04so you can see. Now, when I scroll down
1:07this list, you'll see there's a few data
1:09sources. And if you
1:09can't see the one that you need in here, it
1:12's a good sign that Tableau is calling out
1:14the
1:15developers that are building this. And
1:16currently it's just a list of Tableau
1:18essentially. So
1:19it's a good hint that other people will be
1:21making these connections in the future. So
1:23if you can't
1:24see what you need here, then petition Table
1:27au or go to the Tableau exchange where no
1:29doubt these
1:30connectors will live. And you should be
1:31able to sort of start using this once
1:33connected apps and
1:34all of this stuff starts to roll out. Now,
1:36if I go ahead and select Snowflake, I'm
1:38going to connect
1:38to a Snowflake instance here. To do this,
1:41in a previous video, I showed you how to
1:43set up this
1:44demo database for this particular use case.
1:46So for this one, we're just going to set up
1:48the virtual
1:48connection. We're going to connect to it in
1:50desktop and web edit and show you how it
1:52all
1:52works. But for now, let's go ahead and let
1:54me type in my details. I'll switch to the
1:56authentication
1:57page after I've typed in all my details
1:58here, because I want to keep those secret.
2:00Okay, so
2:01I've logged in here, everything's working.
2:03I'll close my password manager down and you
2:05can see
2:06that we've set up the connection part of
2:08the virtual connection. Now the next thing
2:10I need
2:10to do specifically for Snowflake is choose
2:12a warehouse, select a database. This is
2:14going to
2:14be the Tableau demo database. And you can
2:16see here on the left hand side that once it
2:18's loaded up the
2:20data tables in this particular connection,
2:22just give it a second to connect, you'll
2:25see that here
2:26we have employees, invoices and orders.
2:28These are the tables that I set up in the
2:29previous video.
2:31Now what's cool about this is you can also
2:33use a custom SQL connection as well, like
2:35you can
2:35normally do in Tableau desktop as well. So
2:37that's something to be aware of. I'll
2:39select all three,
2:40because what I want to do is enable users
2:42to be able to create a relationship between
2:44these three
2:44data sources. And in the next video, I'm
2:46going to show you how row level security
2:48works using one of
2:49these tables, the employees table as an
2:51entitlement table. But nonetheless, let's
2:53drag all three into
2:54the view and you can see that they drop in.
2:57Now the nice thing here is you get some
2:58metadata about
2:59these tables. The table name, the
3:01visibility, this is a feature within the
3:04virtual connections that
3:06allows you to hide or show them when a user
3:07connects to them. I'll show you what this
3:09means
3:09a little later on. The database that it's
3:12coming from, the schema in the database,
3:14whether the data
3:15is live or as an extract, you can change
3:17that for all these connections or you can
3:20change it for
3:21each connection one at a time. So be
3:23absolutely sort of clear about what you
3:26want that to do,
3:27generally speaking. Now the data policy, we
3:29have none at the moment, that will be in
3:31the next video
3:32and then you've got the original table name
3:34, this is nothing new. Now one thing I didn
3:36't realize
3:37when I started playing around with this is
3:38that there's a whole other section down
3:40here and it's
3:41not obvious that you can sort of drag this
3:43up. So if you just hover your mouse over
3:45that sort of
3:46bottom lip, you'll see that you can then
3:48drag this up and you get the table sort of
3:50coming through.
3:50So now this has got a bit more space, this
3:53is really nice. I really wish that what
3:55they did is
3:56if you put three tables in, it just moved
3:58this up to sort of match the three tables
4:00like this.
4:01So you didn't have a scroll bar but you
4:02could immediately see that you had some
4:04metadata here
4:04to view, that would be a really nice sort
4:07of addition to the feature. Now if I go to
4:09this
4:09little section here, you can see that I
4:11have these Tableau prep like icons here and
4:13actually this is
4:14good to see. Tableau bringing some things
4:16we've asked for from Tableau prep into the
4:18connection
4:19experience for virtual connections and this
4:21has been a big ask. I personally don't
4:23agree with
4:23that sort of way of thinking, maybe that's
4:25another video but nonetheless the features
4:27here and so you
4:28can see when I click on this table view, I
4:30get a Tableau view of this particular table
4:32. Now if I
4:34switch from employees to invoices, this
4:35preview will change. I'll let it load first
4:37and you can
4:38see that actually happening. There you go,
4:40we've got the employees table there and you
4:42can see here
4:43that everything is pretty nicely set up.
4:45Now what I did in the SQL statement when I
4:47was loading the
4:48data into Snowflake is I actually changed
4:51one of the usernames here to match my name
4:54because for
4:54row level security this has got to work. So
4:57Laura over here in Seattle was the
4:58unfortunate candidate
5:00and I actually changed her full name to
5:01match mine, Tim Neguenna and that's because
5:04that's the
5:04name that I've actually got on Tableau
5:06server for the row level security to work.
5:08So we'll come back
5:09to that a little later on but nonetheless
5:11if I go over to invoices you'll see that
5:13again we load up
5:14a preview at 2155 rows of the data set. So
5:18everything is working as expected, this is
5:21sort of doing the
5:22right job and again you can see there that
5:24I have the salesperson name in there. So
5:27everything is
5:28working fine, the connection's good, now it
5:30comes to sort of actually saving them and
5:32making them
5:33sort of available to users. Well there's a
5:35save button up here and there's a publish
5:37button up
5:38here. Now I kind of got fooled into this
5:40when I first used this, the save button
5:43actually saves
5:43a draft and it's sort of a different
5:45behavior. So when I click save here you'll
5:47see that it says
5:48saved draft virtual connection but when I
5:51hit publish that is actually when the
5:53change is made
5:54so you can now see it's asking me where to
5:55save this. So this is what you want to make
5:57sure you do,
5:58a publish saves the actual details and save
6:01saves the draft. It's kind of a weird sort
6:04of meta but
6:05nonetheless that's just the way it is. I'm
6:07wondering if that will change in the future
6:09,
6:10maybe the draft could be automatically
6:11saved and then you can just hit publish
6:13once and that can be
6:14it. But nonetheless that's now saved, the
6:16virtual connection is available. If I go
6:19back to my list
6:21you can see that Snowflake is now available
6:23here and if I click on that I'll actually
6:25get the three
6:26tables available. So this virtual
6:28connection is set up, it's ready to be used
6:30and we can start using
6:31it. I'm going to show you how to do that
6:33next. Now I know most of you are using
6:35Tableau Desktop still,
6:36WebEdit is picking up pace, I can't tell
6:39you enough, really start using WebEdit,
6:41you'll be surprised that some parts are
6:43actually getting to feature parity with
6:45Tableau Desktop.
6:46But if you're still using desktop that's
6:48absolutely fine. Let me show you how to
6:50connect to that
6:51virtual connection. Now what you have to
6:53remember is that this is a server-based
6:54connection so you
6:56have to go to the top here and select Table
6:57au Server. I'm actually already logged in
6:59and what
7:00I can do is I can go down to this drop down
7:02and immediately select virtual connections.
7:04You can
7:04see that this connection is already here, I
7:07can select connect and when we do that we
7:09get the
7:10three tables. So at this point the server
7:12is actually sort of using my access and
7:14delegating
7:15access to this virtual connection and this
7:17virtual connections comes with these three
7:20tables. So me
7:21as a user I'm now empowered to go ahead and
7:23create my own data model and I can actually
7:25go in here
7:26and bring the invoices in. For this
7:28particular one I know this should be
7:30employee ID. Let's go ahead
7:32and actually match those two up so you can
7:34actually see this working. Let's bring in
7:36orders
7:36and let's do exactly the same thing
7:38employee ID and let's get that working as
7:41well. So that's a
7:42virtual connection pretty much set up. I
7:44can go to sheet one and there we have it
7:46the virtual
7:47connections working inside of Tableau
7:48Desktop. I can start working with it. In
7:50the next video
7:51we'll look at row level security so I will
7:53save this workbook and keep it available
7:55for the dat
7:56demo but nonetheless we've seen pretty much
7:58everything you need to see here in terms of
8:00connecting to a virtual connection. Now
8:02what is interesting is that it doesn't come
8:04up as a
8:04published data source as a server-based
8:06connection. It's got a standard connection
8:08here so you've got
8:09this sort of database icon. So what's
8:12actually happening here is that the user is
8:15first going
8:16after Tableau server and then from Tableau
8:18server Tableau server is managing the
8:19permissions
8:20and then passing on that live connection
8:22over to Snowflake or whatever and so that's
8:24a really
8:25important sort of mechanic to be aware of.
8:27I think these icons need sort of a bit of
8:29an update because
8:30I would still expect to see the server icon
8:32here so a user knows where to go and debug
8:34this because
8:35of course if I right click on this and I
8:37select edit data source and I go in here
8:39you'll see that
8:39it actually gives me the edit connection
8:41and it's going to throw a bug here because
8:43essentially I
8:44need to go and do this over on the server.
8:46It's not going to sort of be working over
8:48here so it's
8:49like a really interesting sort of challenge
8:52here that I think Tableau have to kind of
8:54keep
8:54everything consistent. Maybe this is sort
8:56of a launch bug, maybe it's because I'm
8:58using the
8:58pre-release version here but nonetheless I
9:01would expect sort of that visual icon use
9:04to be
9:04consistent so if I'm connecting to server
9:06to use a virtual connection I would hope to
9:08see a server
9:09icon there but nonetheless this is working
9:12fine. Now let me head back to the area that
9:14I was in
9:15before in fact let me head back to this
9:17browser window here because you can see
9:18everything is
9:19still set up. Now one of the nice things
9:21you can do is of course you can make
9:23something
9:23hidden for a temporary period so in this
9:27case I'm going to hit publish now the invo
9:29ices table is
9:30hidden but I can still work on this. I can
9:32still now make it available and hit save
9:35and now I'm
9:35saving the draft it's not yet been
9:37published. I can test something make sure
9:39everything works and
9:40then when I'm done I can go ahead hit
9:42publish and now the virtual connection is
9:44up to date.
9:44This allows you to come back to a virtual
9:46connection and edit it over time add data
9:48policies and centralize row level security
9:51policies to it over time as well. So these
9:53are
9:54these things are going to have longevity
9:55and unlike other connections they're not
9:57going to die a death
9:58because there's actually some weight behind
10:00these and hopefully they'll start to
10:02collect the
10:02metadata that people have always wanted.
10:05Now the last place I'll show you how to use
10:06this is of
10:07course web edit. So how do we do this well
10:09let's go to the 21.4 folder here and let's
10:12just go ahead
10:12and create a new workbook. Now when we
10:14create a new workbook of course it's web
10:16edit we do exactly
10:17the same thing select virtual connection
10:19select snowflake connect and now we're back
10:22in here we've
10:22got the web edit version of this we can go
10:25ahead drag in the employees table and we
10:28can essentially
10:28do the same thing as we did before. There's
10:30nothing really new here but nonetheless
10:32this is how it
10:33works and people always ask for these
10:35things if I don't cover it someone will say
10:37hey you didn't
10:38show us how to do it and here I am. So
10:40there we go that's the connection setup
10:43super simple exactly
10:44the same thing we've got web edit here we
10:46've got desktop over here the exact same
10:48setup and that's
10:49pretty much virtual connections for you. So
10:51thanks for watching check out the next
10:53video on centralized
10:54row level security to see how that works
10:56that's a bit more of a complicated video
10:58but I think
10:59you're going to like it so check it out
11:01thanks for watching and I'll catch you in
11:03the next one.
Tableau Release Notes: Virtual connections are a new content type in Tableau Server and Tableau Online that are used to create and share access to tables, securely embed service account credentials, define data policies and extract data centrally.
Time Stamps 00:00 - Intro 01:28 - Setting a connection 06:33 - Using a virtual connection in Desktop 09:12 - Update the connection 10:05 - Using a virtual connection in web-edit