Plan The Data Source - Tableau
Plan The Data Source - Tableau
At the center of Tableau is your data. How successful you are with exploring
data, answering questions, and building visualizations for yourself or others to
consume all depend on the underlying data.
A Tableau data source is the link between your source data and Tableau. It is
essentially the sum of your data (either as a live connection or an extract), the
connection information, the names of tables or sheets containing data, and the
customizations that you make on top of data to work with it in Tableau. Those
customizations include things like how the data is combined and metadata
such as calculations, renamed fields, and default formatting.
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 1/15
03/10/2023, 19:23 Plan the Data Source - Tableau
connect to your data, such as database server name and server sign-in
information.
Note: The terms data source and data connection have been used
indiscriminately in the past and may lack clear distinction in older
materials.
It’s also important to bear in mind the difference between the Tableau data
source (Tableau’s access to your data and all the customizations that may
be involved) and the source data itself (such as a database or Excel
spreadsheet). Planning a data source in the sense of designing a database
is not the scope of this topic.
Tableau data sources can remain embedded in the workbook where they were
originally created, or they can be published separately. Published Data Sources
allow for centralization and scaling of curated data sources. See Best Practices
for Published Data Sources (publish_datasources_about.htm) for more
information.
Before anything else, make sure you’re clear on the purpose of the data source.
If you’re creating a catch-all data source for a wide variety of users with broad
questions, you’d go about it differently than if you were constructing a niche
data source optimized for performance. It’s important to know your goal from
the outset.
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 2/15
03/10/2023, 19:23 Plan the Data Source - Tableau
With that goal in mind, there are several items to consider and plan before you
build a data source in Tableau:
The location of your data can be as simple as a single excel file on your
computer or a Google sheet you’ve created, or as complex as multiple
databases using various technologies. Access can also involve specific drivers or
connectors for a database or login information for a database server.
Questions to consider:
Do the correct Tableau users have access and permissions to the data and
to Tableau?
What user account should be used to log into the database?
Will user filtering or row level security
(https://help.tableau.com/current/server/en-us/rls_bestpractices.htm) be
needed?
Is the source data on premises or in the cloud?
This may have implications if the data is published to Tableau Cloud
(https://help.tableau.com/current/online/en-
us/to_publish.htm#tableau-online-data-connection-support).
Are there Supported Connectors (exampleconnections_overview.htm)?
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 3/15
03/10/2023, 19:23 Plan the Data Source - Tableau
Are there any limitations for that database (does it support all the
functionality you hope to use)?
Your organization may already have well-structured data that you can connect
to or ETL processes you can leverage, or you may need to use Tableau Prep
Builder to perform cleaning and shaping operations to get your data into a
useful format.
Questions to consider:
Tableau needs to know how to query the data, which is conveyed by The
Tableau Data Model (datasource_datamodel.htm). If the data comes from
multiple tables, the data needs to be combined. Methods for combining data
include relationships, joins, unions, and blends.
Questions to consider:
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 4/15
03/10/2023, 19:23 Plan the Data Source - Tableau
Data is often stored in a way that isn’t easy for a person to use comfortably.
For example, default field names can be unwieldy, custom formatting may be
desired, definitions of abbreviations or codes may be missing, or common
calculations may not be present in the underlying data. Creating a metadata
(https://help.tableau.com/current/pro/desktop/en-
us/datafields_dwfeatures.htm) layer with those pieces of information can
make the data much easier to understand and use.
Questions to consider:
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 5/15
03/10/2023, 19:23 Plan the Data Source - Tableau
A data source may remain in the workbook where it was created—an embedded
data source (https://help.tableau.com/current/server/en-
us/permissions.htm#data-access-for-published-tableau-data-sources)—or it
may be published to Tableau Server or Tableau Cloud independently of any
analysis as a content asset all its own. This centralization of published data
sources has the added benefit of security and scaling, allowing multiple users
to access a consistent data source. Published data sources can also take
advantage of Tableau Catalog (https://help.tableau.com/current/server/en-
us/dm_catalog_overview.htm) and recommendations and provide a single
source of truth for an organization.
Questions to consider:
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 6/15
03/10/2023, 19:23 Plan the Data Source - Tableau
In addition, Tableau data sources can be live connections to the source data or
the data can be copied out as a refreshable extract. Extracts can boost the
analysis performance or prevent resource drains against database systems.
Questions to consider:
There’s a lot that goes into a well-designed and performant data source. You
don’t have to publish your first attempt, though. Like creating a good
visualization, building a data source can be an ongoing process. Try your hand
at combining the data you think you need and then see if you can build the viz
you want. You can always go back and write a new calculation or bring in
another table of data. Do some user testing and ask a colleague if they can
figure out your field names.
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 7/15
03/10/2023, 19:23 Plan the Data Source - Tableau
Of course, it’s best to only publish data sources you’re confident in and only
certify ones that have passed quality assurance. By the time your data source is
in front of users, they should be able to trust it.
Combine Data
If your data comes from one table, you can connect to your data
(https://help.tableau.com/current/pro/desktop/en-
us/basicconnectoverview.htm) to create the data source, drag the table onto
the canvas, and then start building your view. But if your data is spread across
multiple tables—or across multiple databases—you’ll need to combine it.
Combining data happens on the Data Source Page.
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 8/15
03/10/2023, 19:23 Plan the Data Source - Tableau
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 9/15
03/10/2023, 19:23 Plan the Data Source - Tableau
menu from the icon next to the Data Source’s name, as seen in the image
below.
Relationships are the default way to combine data in Tableau. Relationships are
a dynamic, flexible way to combine data from multiple tables for analysis. If
necessary, tables can also be joined or unioned. Data sources can also be
blended. Let’s take a look the options for how data can be combined in Tableau
and some of the situations when each method is useful.
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 10/15
03/10/2023, 19:23 Plan the Data Source - Tableau
Relationships Establish the potential for joins between two tables based on
related fields. Does not merge data together to create a new,
fixed table. During analysis, queries the relevant tables
automatically using the contextually-appropriate joins to
generate a custom table of data for that analysis.
Joins Merge two tables of data based on a join clause and join type
to form a new, fixed table of data. Often used to add new
columns of data across the same basic row structure.
May cause data loss with some join types if fields are not
present in all tables. May cause data duplication if tables are
at different levels of detail.
Unions Merge two or more tables of data to form a new, fixed table
of data. Used to append (add new rows of) data across the
same basic column structure.
Blends Work across two or more separate Tableau data sources. Data
remains separate. Tableau queries the data sources
independently and visualizes the results together in the view,
based on the linking fields established for that sheet. Mimics
the behavior of a left join and may filter data from secondary
data sources.
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 11/15
03/10/2023, 19:23 Plan the Data Source - Tableau
Relationships
Relating is a method for working with data from multiple tables based on
shared fields—columns—between those tables. Establishing a relationship
informs Tableau how rows can be connected across tables. Tableau holds that
information but does not immediately bring the rows together. Instead, when a
visualization is created, the fields involved in the analysis are traced back
through the relationship and the appropriate data is returned from its original
table.
Because the data is never fully brought together into a single table outside the
context of a visualization, relationships are useful when the data is at different
levels of detail, or granularity. For example, if you need to work with data
about daily rainfall in one table but hourly temperatures in another.
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 12/15
03/10/2023, 19:23 Plan the Data Source - Tableau
For more information about how to combine tables using relationships, see
Relate Your Data (relate_tables.htm) and these Tableau blog posts:
Join
Joining is a method for combining tables related by common fields. The result
of combining data using a join is a table that extends horizontally by adding
columns of data.
For more information about how to join data in Tableau, see Join Your Data
(joining_tables.htm).
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 13/15
03/10/2023, 19:23 Plan the Data Source - Tableau
Data blending
When you use data blending to combine your data, you combine data in what is
called a primary data source with common fields from one or more secondary
data sources.
Data blending is useful when you need to change how the data source is
configured on a sheet-by-sheet basis, when you want to combine databases
that don’t allow relationships or joins
The result of combining data using data blending is a virtual table that extends
horizontally by adding columns of data. The data from each data source will be
aggregated to a common level before being displayed together in the
visualization.
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 14/15
03/10/2023, 19:23 Plan the Data Source - Tableau
For more information about how data blending works and how to blend your
data in Tableau, see Blend Your Data (multiple_connections.htm).
Union
Unioning is a method for appending values (rows) to tables. You can union
tables if they have the same columns. The result of combining data using a
union is a virtual table that has the same columns but extends vertically by
adding rows of data.
You can union tables in one of two ways: manually or using wildcard search.
For more information about how to union data using one of these methods in
Tableau, see Union Your Data (union.htm).
https://help.tableau.com/current/pro/desktop/en-us/datasource_plan.htm 15/15