Connecting to Data and Editing Data Sources

Connect to Data

To build views of your data, you must first connect Tableau to data and set up the data source.

To connect to Data

  1. Select Data > Connect to data or press Ctrl + D on your keyboard. You can also select the Connect to data option on the start page.

  2. On the Connect page, select the type of data you want to connect to.
After the initial connection is established, the database and schemas or tables display on the left side of the page. Here you can combine different sheets or tables to create joins, preview the data in your data source, and then go to the worksheet. When you go to the worksheet, the data source fields display on the left side of the workbook in the Data window.

You can display information about the connection by selecting the data source on the Data menu and then selecting Properties. The properties of an example data source are shown below.

Edit the Data Source

At anytime during your analysis you can edit the data source used in the workbook. You might want to edit the data source to:
  • Specify a new location for the data source. For example, suppose the name or location of a data source you were using has changed and is no longer available using the previous connection information. In this case, you can direct the workbook to the correct location without losing your work.
  • Apply analyses created using one data source to another data source.
    Suppose you create a workbook containing several views involving markets, products, sales, and profits and you want to apply the analyses to a new data source. Instead of recreating each view, you can edit the original data connection and specify a new data source.

To edit the data source

  1. On the Data menu, select a data source, and then select Edit Data Source.
  2. On the data source page, make the changes to the data source.
    For example, if you are using a Microsoft Excel data source, you can specify a new file by clicking the Excel file name under Workbook. Alternatively, you can select a different table to analyze.

Replace Field References

When you successfully connect to a new data source, all worksheets in the workbook that previously referred to the original data source now refer to the new data source. If the new data source does not have the same field names as the original workbook, the fields become invalid and are marked with an exclamation point . You can quickly resolve the problem by replacing the field’s references.
For example, say you have a workbook connected to a data source that contains a Product Category field. Then you edit the data source connection to point to a new data source that has all the same data but instead of Product Category, the field name has been changed to Product Type. The Product Category field remains in the Data window but is marked as invalid. To make the field valid, you can replace the references, which means you can map the invalid field to a valid field in the new data source (for example, Product Category corresponds to Product Type).

To replace field references

  1. Right-click the invalid field in the Data window and then select Replace References.
  2. In the Replace References dialog box, select a field from the new data source that corresponds to the invalid field.

Duplicate the Data Source

Sometimes you’ll want to make changes to a data source such as add more tables, hide and show fields, set field defaults, and so on. When you make these changes it affects all sheets that use the data source. You can duplicate the data source so that you can make the changes without affecting the existing sheets. To duplicate a data source, on the Data menu, select a data source , and then select Duplicate. When you duplicate a data source, the duplicate source name has “(copy)” appended to the end.

Rename the Data Source

When you connect to a data source, you are given the option to give it a name for use in Tableau Desktop. You can change the name you specified by selecting the data source on the Data menu and then selecting Rename. Naming a connection is useful when you have a single workbook connected to many data sources. The name you assign can help you keep track of the specifics of the connection. You can also review the connection properties by selecting a data source on the Data menu, and then selecting Properties.

3 comments:

  1. Hi, I read your whole blog. This is very nice. Good to know about the career in Tableau Training & Certification. We are also providing various Tableau Training , anyone interested can Tableau Training for making their career in this field .

    ReplyDelete
  2. Hi, I read your whole blog. This is very nice. Good to know about the career in. Tableau Administrator Resumes - 7 Steps to Write One + Free SamplesTableau Administrator for making their career in this field .

    ReplyDelete