Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-12-09 14:55:21 +00:00

42 lines
4.0 KiB
HTML

<a name="mrs_01_1434"></a><a name="mrs_01_1434"></a>
<h1 class="topictitle1">REFRESH TABLE</h1>
<div id="body1595920212398"><div class="section" id="mrs_01_1434__sd8e4ffaa71fc4034a9e2882d7c664984"><h4 class="sectiontitle">Function</h4><p id="mrs_01_1434__p37191523174813">This command is used to register Carbon table to Hive meta store catalogue from exisiting Carbon table data.</p>
</div>
<div class="section" id="mrs_01_1434__s62a70620dabc4e4eb96778f71c580e7f"><h4 class="sectiontitle">Syntax</h4><p id="mrs_01_1434__a876a375878f34475b81778d30639af9e"><b><span class="cmdname" id="mrs_01_1434__cmdname163911923016">REFRESH TABLE</span></b> <i><span class="varname" id="mrs_01_1434__vda68c2e0cec5495092f0669b5cea4d1a">db_name.table_name</span></i>;</p>
</div>
<div class="section" id="mrs_01_1434__sd00174c8f3e8417ea0037e034192d094"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1434__td330633f0f1a4e839893ee60997ac66b" frame="border" border="1" rules="all"><caption><b>Table 1 </b>REFRESH TABLE parameters</caption><thead align="left"><tr id="mrs_01_1434__r520a27852cb34cb7928beb87ae57c383"><th align="left" class="cellrowborder" valign="top" width="19.439999999999998%" id="mcps1.3.3.2.2.3.1.1"><p id="mrs_01_1434__a2d7b4ba625ae4e73b3de582488dc2354">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="80.56%" id="mcps1.3.3.2.2.3.1.2"><p id="mrs_01_1434__a13d327fe75f04ee5aa721ffef31b1687">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_1434__r29602039075d4ee29712ba3776de3028"><td class="cellrowborder" valign="top" width="19.439999999999998%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_1434__aa52e22f2600e4f7cb864be20ae67a97f">db_name</p>
</td>
<td class="cellrowborder" valign="top" width="80.56%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_1434__a75965636f150489ab9dbf4e657309412">Name of the database. If this parameter is left unspecified, the current database is selected.</p>
</td>
</tr>
<tr id="mrs_01_1434__re6d39247ca1244249d7687ea10dcd0c8"><td class="cellrowborder" valign="top" width="19.439999999999998%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_1434__a94889b6d62534a839457c1f3f6ecc741">table_name</p>
</td>
<td class="cellrowborder" valign="top" width="80.56%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_1434__a9cc3bd83b1044286b7a79068ee33df1e">Name of the table.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_01_1434__sa2d037069b6d4ccba70108f63dcd4897"><h4 class="sectiontitle">Usage Guidelines</h4><ul id="mrs_01_1434__ul413241145112"><li id="mrs_01_1434__li313271135111">The new database name and the old database name should be same.</li><li id="mrs_01_1434__li31325117512">Before executing this command the old table schema and data should be copied into the new database location.</li><li id="mrs_01_1434__li19132131111515">If the table is aggregate table, then all the aggregate tables should be copied to the new database location.</li><li id="mrs_01_1434__li15132311125112">For old store, the time zone of the source and destination cluster should be same.</li><li id="mrs_01_1434__li101321511165117">If old cluster used HIVE meta store to store schema, refresh will not work as schema file does not exist in file system.</li></ul>
</div>
<div class="section" id="mrs_01_1434__s02de0ffe591b41d9b8435c03f68288f4"><h4 class="sectiontitle">Examples</h4><p id="mrs_01_1434__p177320369216"><b><span class="cmdname" id="mrs_01_1434__cmdname155157187319">REFRESH TABLE</span></b> <em id="mrs_01_1434__i939713371521">dbcarbon</em>.<em id="mrs_01_1434__i15397437923">productSalesTable</em>;</p>
</div>
<div class="section" id="mrs_01_1434__sc1e4d30b28cb4317b1b12496c7d2b1d6"><h4 class="sectiontitle">System Response</h4><p id="mrs_01_1434__p351470125317">By running this command, the Carbon table will be registered to Hive meta store catalogue from exisiting Carbon table data.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1424.html">DDL</a></div>
</div>
</div>