Use a Virtual Connection

After a virtual connection is published and permissions are set, it's available to users to connect to data in the same ways that users access all data in Tableau. When you must edit a virtual connection or the data policy in the connection – for example, when the underlying schema changes – simply open the connection in the virtual connection editor, make your changes and either save or publish the updates. You can also replace an existing data source in a workbook with a virtual connection.

Connect to a virtual connection

For web authoring in Tableau Cloud or Tableau Server:

  1. On the Home or Explore page, click New.
  2. Select the type of content you want to create: workbook, flow or published data source.
  3. In Connect to Data > On This Site > Content Type drop-down menu, select Virtual Connections.
  4. Select the name of the connection and click Connect.

For Tableau Desktop and Tableau Prep:

  1. On the Connect pane, under Search for Data, click Tableau Server.
  2. Enter the server name and click Connect, or click Tableau Cloud.
  3. Enter the information prompted for.
  4. On the Search for Data dialog box, from the Content Type drop-down menu, select Virtual Connections.
  5. Select the name of the connection and click Connect.

Note: There's no need to enter credentials when you connect using a virtual connection. The credentials to access the data are embedded in the connection.

Edit a virtual connection or data policy

When editing a published virtual connection, the connection stays available to users in its current published state. For more information, see Publish a Virtual Connection and Set Permissions.

To edit a connection, navigate to it from the Explore page. Note that even though database credentials are embedded in the connection, only those with the database credentials can make any changes to a virtual connection.

  1. From the drop-down menu, select All Virtual Connections, then select the connection you want to edit.
  2. Click Edit Virtual Connection.
  3. Enter the information prompted for to connect. To edit a connection, you must enter the credentials required to access the data.
  4. Click Sign In.
  5. In the virtual connection editor, make your changes and then either save a draft or publish the connection.

Respond to underlying schema changes

When the underlying schema in a virtual connection changes – for example, a table is added or deleted, or a column is added or renamed – you must edit the virtual connection to reflect the schema changes and then republish the connection. (If the connection has extracts, remember to refresh the extracts.) This way, you can add or edit the tables, columns and policies in the connection before new data is exposed to everyone.

Work with virtual connection revision history

When you publish a virtual connection, a version is saved in the revision history for Tableau Cloud or Tableau Server. You can revert to a previous version at any time.

To access revision history, you must have a Creator site role and the View and Overwrite permissions.

To see the virtual connection revision history, click the actions menu (. . .) for the virtual connection, then click Revision History.

The actions menu with Revision History highlighted

Restore or delete a virtual connection revision

To restore a virtual connection revision, select a revision and then click Open. You are then prompted to discard the existing version of the connection. When you click Discard and Continue, the revision you selected becomes the current version of the connection.

The “Open Revision” dialog with “Discard and Continue” highlighted.

To delete a revision, from the revision's actions menu (. . .), click Delete.

A revision’s actions menu with "Delete…" highlighted.

Replace an existing data source in a workbook with a virtual connection

For web authoring in Tableau Cloud or Tableau Server:

  1. Download the workbook. For more information, see Download Views and Workbooks(Link opens in a new window) in Tableau Desktop Help.
  2. In Tableau Desktop, open the workbook and replace its existing data source with a virtual connection. For more information, see Replace Data Sources(Link opens in a new window) in Tableau Desktop Help.
  3. In Tableau Desktop, upload the workbook to your Tableau Cloud or Tableau Server site. For more information, see Upload Workbooks to a Tableau Site(Link opens in a new window) in Tableau Desktop Help.
  4. In Tableau Cloud or Tableau Server, click Publish to save your changes to the server.

For Tableau Desktop:

  1. Open the workbook and replace its existing data source with a virtual connection. For more information, see Replace Data Sources(Link opens in a new window) in Tableau Desktop Help.
  2. Republish the workbook. For more information, see Simple Steps to Publish a Workbook(Link opens in a new window) in Tableau Desktop Help.

Who can do this

To use a virtual connection, you must be a server or site administrator, or Creator.

To edit a virtual connection or data policy, you must

  • have credentials to the database that the virtual connection connects to, and
  • be a server or site administrator, or a Creator.

To migrate existing content to use a virtual connection, you must

  • be a server or site administrator, or
  • be a Creator who is also the data source owner.
Thanks for your feedback!Your feedback has been successfully submitted. Thank you!