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:
- On the Home or Explore page, click New.
- Select the type of content you want to create: workbook, flow or published data source.
- In Connect to Data > On This Site > Content Type drop-down menu, select Virtual Connections.
- Select the name of the connection and click Connect.
For Tableau Desktop and Tableau Prep:
- On the Connect pane, under Search for Data, click Tableau Server.
- Enter the server name and click Connect, or click Tableau Cloud.
- Enter the information prompted for.
- On the Search for Data dialog box, from the Content Type drop-down menu, select Virtual Connections.
- 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.
- From the drop-down menu, select All Virtual Connections, then select the connection you want to edit.
- Click Edit Virtual Connection.
- Enter the information prompted for to connect. To edit a connection, you must enter the credentials required to access the data.
- Click Sign In.
- 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.
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.
To delete a revision, from the revision's actions menu (. . .), click Delete.
Replace an existing data source in a workbook with a virtual connection
For web authoring in Tableau Cloud or Tableau Server:
- Download the workbook. For more information, see Download Views and Workbooks(Link opens in a new window) in Tableau Desktop Help.
- 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.
- 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.
- In Tableau Cloud or Tableau Server, click Publish to save your changes to the server.
For 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.
- 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 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.