Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Connect to Your Data

Learning Objectives

After completing this unit, you'll be able to:  

  • Connect to a data source using Tableau Cloud.
  • Prepare your data for analysis.

To start creating content on a Tableau site, you need to connect to a data source. Users with appropriate permissions can connect to data sources that have been published to a Tableau site.

Note

If you have Creator permissions, Tableau lets you connect on the web directly to a wide variety of data sources. For more information about connecting to data for the Creator role, see Creators: Connect to data on the web.

Connect to Published Data Sources

The first step in creating a data connection is to create a new workbook. On the Explore page, click the New | Workbook option. 

New | Workbook option to connect to a data source

This opens the Connect to Data window. Select the data source you want to connect to and click Connect. If you don’t see the data source you’re looking for, you may not have permissions to view or connect to it.

Connect to Data shows the data sources that you can connect to

This opens a new workbook, which is connected to the data source.

The new workbook is connected to the data source

You can also connect to data within a workbook while editing it. In the editing mode, click the New Data Source icon.

New Data Source icon

Customize Your Data

After connecting to the data, you can customize it by modifying data attributes so that it’s ready for analysis. These changes do not affect the underlying data source.

Ideally, data sources are prepared by a data steward. Explorers should not need to prepare data beyond simple formatting and renaming based upon how they want the data displayed in a visualization.

Customize the Data Source Within the Workbook

When web authoring, you can make changes to a data source within the Data pane of a workbook. The Data pane has many features and functions to help you organize and customize your data fields.These changes impact the way data is displayed within the workbook only. They do not affect the underlying data source. Here are some of the changes you can make.

  • Rename a Field

Rename fields in the Data pane. For example, you could rename a field named Ship Mode in the data source to be Ship Method. Renaming a field does not change the name of the field in the underlying data source; rather, it is given a special name that appears only in Tableau workbooks. The changed field name is saved with the workbook as well as when you export the data source. You can rename any type of field. At the right of the edit field is a small circular arrow that you can click to restore the original data source field name.Renaming Ship Mode to Ship Method

  • Organize Dimensions and Measures into Folders

Reorganize the items in the Data pane from its default layout using folders.

Organize data by creating folders in the Data pane

  • Hide or Unhide Fields

Selectively hide or show fields in the Data pane. To hide a field, right-click (control-click on a Mac) the field and select Hide. When you want to change your fields from hidden to visible, select Show Hidden Fields on the Data pane menu.Hide and unhide fields from the Data pane

  • Assign a Geographic Role to a Field

Tableau has built-in geographic roles, including City, State/Province, Country/Region, and Zip Code/Postcode. These can be useful when creating maps in Tableau. To assign a geographic role to a field, right-click (control-click on a Mac) the field, select Geographic Role and then select the desired menu option. For example, you can assign the geographic role of Country/Region to the Region field.Assign a geographic role to a field

You saw how to modify data attributes in a view in order to customize the format for use in the workbook. Now that your data is organized for analysis within the workbook, you can start building views using the Tableau workspace. But before you do that, let’s practice connecting to a published data source from a workbook on a Tableau site and then customize some data properties using the Trailhead Simulator.

Connecting to and Editing a Data Source

You learned how you can connect to a data source in Tableau Cloud and make any desired customizations to data properties before authoring a view. Now you are ready to connect to your own data source and customize some data for the analysis work you have been tasked with.

If you’ve completed other Tableau modules in Trailhead, you’re probably already familiar with the Trailhead Simulator. 

For the best experience, view the Trailhead Simulator on a computer, not a mobile device. Trailhead Simulator is different from a Trailhead Playground. The simulator doesn’t store your progress or any data you enter. If you close your browser, you start from the beginning of the simulation again. You can always use the navigation controls at the bottom of the simulator to get back to where you left off. 

A screenshot showing the navigation controls at the bottom of the simulator. There is a left arrow button, a right arrow button, a scrub bar, and a close (x) button.

Navigation Controls

Description

(1) Left Arrow

Go backward in the simulator.

(2) Right Arrow

Go forward in the simulator.

(3) Scrub Bar

View your progress, plus you can use the progress arrow to quickly move to a different location within the simulator.

(4) Close Button

Exit the simulator. Remember that if you close the simulator, you start from the beginning the next time you launch it.

When you click in the wrong spot, highlighting shows you where to click.

screenshot of what a highlighted element looks like in the simulator.

Let’s get started.

Connect to a Data Source

Imagine that you will be starting some analysis work with the company data. The data source you need for the analysis has already been published to your Tableau site by a data steward in the company. The data source is named Sample-Superstore. 

  1. Launch Trailhead Simulator.
  2. Click Connect to a Data Source.
  3. Click Begin.
  4. You are on the Home page of your Tableau Cloud site. Click Explore in the left pane to see all content.
  5. To open a new workbook, click New, and then click Workbook.
  6. Connect to Data shows all data sources you have access to. Select Sample- Superstore, and then click Connect. A new workbook opens with a connection to Sample-Superstore.Connected Sample-Superstore data source
  7. Click Next Exercise.

Next, you make changes to the data so that it meets the needs of the analysis you are doing.

Edit a Data Source

Imagine that you are connected to your company data source, but quickly realize that you need to make some changes to the fields to make the data more understandable. You rename the Order Status field to Order Priority and also remove the geographic role for Region.

  1. Click Begin.
  2. The workbook connected to Sample-Superstore is open. Change the name of the field Order to Order ID to make it more understandable. Right-click Order.
  3. From the menu, select Rename.
  4. In the Rename Field, type Order ID and then press enter (Windows) or return (Mac).
  5. Click OK to close the dialog box.
  6. Next, we remove the geographic data role from the Region field. Right-click Region.
  7. From the menu, select Geographic Role, and then click None.
    Data source with modified fields

You customized some data properties for some fields in your data to help with your analysis. You are now ready to start building views in Tableau Cloud.

  1. Click Home to restart the activity or Exit to close the simulation.

Resources

Partagez vos commentaires sur Trailhead dans l'aide Salesforce.

Nous aimerions connaître votre expérience avec Trailhead. Vous pouvez désormais accéder au nouveau formulaire de commentaires à tout moment depuis le site d'aide Salesforce.

En savoir plus Continuer à partager vos commentaires