相关文章推荐
小百科
›
Replace Data Sources - Tableau
replace
tableau
帅气的松鼠
1 年前
</noscript><div id="app" class="wrapper"><header id="tableau-help-article-header" class="container--full-width quick-help-header"><div class="container--centered"><div class="header__mobile-menu quick-help-hidden"><menu-tree-toggle/></div><div class="header__logo quick-help-hidden"><a id="tableau-logo" href="https://www.tableau.com/en-us/"><img src="./Resources/tableau-logo.png" class="header__logo__img" alt="Tableau"/></a></div><div class="header__search"><search-header-help placeholder="Search"/></div></div></header><div class="container--navigation-top quick-help-hidden content-only-hidden"><div id="help-subheader" class="subheader print-hidden"><div class="container--centered"><h1 class="heading--subheader">Tableau Desktop and Web Authoring Help</h1></div></div><div class="container--top-links"><div class="container--centered container--breadcrumbs"><div><breadcrumb-links-help/></div></div><div id="help-container-menu-headings" class="container--menu-headings"><nav class="nav-medium-screen"><menu-heading-links-static-help menu-title="In this article" :disabled="false" :headings="pageHeadings"/></nav></div></div></div><div class="section--main container--full-width"><div class="container--centered"><nav class="nav-side nav-side--left" role="navigation"><menu-tree-help menu-title="Contents"/></nav><article role="main"><h2 class="topic--title" id="topic-title" tabindex="-1">Replace Data Sources</h2><div class="caption article__tags content-only-hidden quick-help-hidden"><span class="article__tags--applies-to"> </span><br/><span class="article__tags--role"> </span></div><div id="content-body"> <p class="note"><b>Note:</b> Replacing a data source isn’t supported by Tableau Cloud or Tableau Server. </p> <p>Users can update a workbook or sheet with a different data source. Replacing a data source doesn’t merge or edit the data sources. It redirects fields used in the worksheet to map to corresponding fields in the new data source. Any fields that the user creates in the <i>original</i> data source are copied over to the new data source. Fields that aren’t included in the original data source must be manually copied and pasted to the <i>new</i> data source before replacing the old one. When you replace a data source, the folder structures aren't copied over. </p> <p>The two data sources don’t have to be identical, any differences between the data sources will affect the sheets in the workbook and the fields in the view. Any fields, groups, sets, and calculated fields that don’t exist in the new data source (or have a different name) are removed from the Data pane. For more information about how to replace field references to fix invalid fields, see <a href="howto_connect.htm" class="MCXref xref">Edit Data Sources</a>. </p> <h3 is="heading-item" :level="3" id="replace-a-data-source">Replace a Data Source</h3> <p>Complete the following steps to replace a data source. </p> <li value="1">Open a workbook that connects to the <i>original</i> data source. </li> <li value="2">Select <span class="uicontrol">Data</span> > <span class="uicontrol">New Data Source</span> and then connect to the <i>new</i> data source.</li> <li value="3">On the Data Source page, drag a table to the canvas to set up the data source (if this isn’t automatically done for you).</li> <li value="4">Go to the sheet tab and select <span class="uicontrol">Data</span> > <span class="uicontrol">Replace Data Source</span>. <p class="note"><b>Note:</b> You must have at least one field in the view to make the <span class="uicontrol">Replace Data Source</span> option available.</p><p><img src="Img/connect_basic_replace1.png" style="text-align: center;" alt=""/></p></li> <li value="5">In the Replace Data Source dialog box, select the <span class="uicontrol">Current</span> data source and the <span class="uicontrol">Replacement</span> data source.</li> <li value="6">(optional) Under the <b>Current</b> field, select the checkbox to replace the current worksheet only. </li> <li value="7">When finished, select <span class="uicontrol">OK</span>. </li> <p>All worksheets, dashboards, and stories that used the <i>original</i> data source are updated to use the <i>new</i> data source. You can click <span class="uicontrol">Undo</span> on the toolbar to revert the change and return to the original data source.</p> <p class="note"><b>Note:</b> You can only replace one data source with another data source when both data sources are relational data sources, or when both data sources are cube (multidimensional) data sources. In Tableau, cube data sources are supported for Windows only. </p> <h3 is="heading-item" :level="3" id="replace-the-data-source-for-a-single-sheet">Replace the Data Source for a Single Sheet</h3> <p>If you wish to replace the data source for a single sheet, select the checkbox for <span class="uicontrol">Replace current worksheet only</span>. </p>
推荐文章