Yang, Tong 48706b7552 MRS COMP-LTS 320-lts.1 version
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2024-04-12 12:51:10 +00:00

67 lines
6.0 KiB
HTML

<a name="mrs_01_24800"></a><a name="mrs_01_24800"></a>
<h1 class="topictitle1">SAVE_POINT</h1>
<div id="body0000001585194861"><div class="section" id="mrs_01_24800__en-us_topic_0265792787_s1c2fb9c848d3442b9a23498a756f65f5"><h4 class="sectiontitle">Function</h4><p id="mrs_01_24800__p8807155341516">Manages savepoints of Hudi tables.</p>
</div>
<div class="section" id="mrs_01_24800__en-us_topic_0265792787_s74e38960eb19422bb6e00e049a8e144e"><h4 class="sectiontitle">Syntax</h4><ul id="mrs_01_24800__ul1582105073215"><li id="mrs_01_24800__li15821350103215">Creating a savepoint:<p id="mrs_01_24800__p84831981338"><a name="mrs_01_24800__li15821350103215"></a><a name="li15821350103215"></a><strong id="mrs_01_24800__b21253085514">call create_savepoints('[table_name]', '[commit_Time]', '[user]', '[comments]');</strong></p>
</li><li id="mrs_01_24800__li2888850323">Viewing all existing savepoints<p id="mrs_01_24800__p98881650529"><a name="mrs_01_24800__li2888850323"></a><a name="li2888850323"></a><strong id="mrs_01_24800__b174321532205514">call show_savepoints(table =&gt;'[table_name]');</strong></p>
</li><li id="mrs_01_24800__li16333145473217">Rolling back a savepoint:<p id="mrs_01_24800__p1620111371034"><a name="mrs_01_24800__li16333145473217"></a><a name="li16333145473217"></a><strong id="mrs_01_24800__b171943575515">call rollback_savepoints('[table_name]', '[commit_Time]');</strong></p>
</li></ul>
</div>
<div class="section" id="mrs_01_24800__en-us_topic_0265792787_sc562f5f2c9e440dc8ea25a1f3b145668"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24800__en-us_topic_0265792787_tfbb991adf4344d2fb27629f70630100e" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="mrs_01_24800__en-us_topic_0265792787_ra556d91581f04f5188576c64927a0949"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.3.2.2.4.1.1"><p id="mrs_01_24800__en-us_topic_0265792787_af4cec97db0194bc4b70e1eeee4a8dd0e"><strong id="mrs_01_24800__en-us_topic_0265792787_a7159780c1ca74891b3b3f3781df6b927">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.4.1.2"><p id="mrs_01_24800__en-us_topic_0265792787_a6014dc4378b24178aac7350b85362666"><strong id="mrs_01_24800__en-us_topic_0265792787_a61e428b8462f4ec6837d268ee9c7e33d">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.3.2.2.4.1.3"><p id="mrs_01_24800__p281718341555">Mandatory</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_24800__en-us_topic_0265792787_r32b79a740ce44d94a3a3982e80ba7f48"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.1 "><p id="mrs_01_24800__p1887422881">table_name</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.4.1.2 "><p id="mrs_01_24800__en-us_topic_0265792787_ad05a3f749c7c45b780e0d8b4218b508d">Name of the table to be queried. The value can be in the <strong id="mrs_01_24800__b29824389362">database.tablename</strong> format.</p>
</td>
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.3 "><p id="mrs_01_24800__p88171434853">Yes</p>
</td>
</tr>
<tr id="mrs_01_24800__row384112558810"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.1 "><p id="mrs_01_24800__p240812620615">commit_Time</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.4.1.2 "><p id="mrs_01_24800__p984116551581">Specified creation or rollback timestamp</p>
</td>
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.3 "><p id="mrs_01_24800__p381719341251">Yes</p>
</td>
</tr>
<tr id="mrs_01_24800__row1140651517610"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.1 "><p id="mrs_01_24800__p340631519616">user</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.4.1.2 "><p id="mrs_01_24800__p1640617155610">User who creates a savepoint</p>
</td>
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.3 "><p id="mrs_01_24800__p34076151264">No</p>
</td>
</tr>
<tr id="mrs_01_24800__row128701911963"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.1 "><p id="mrs_01_24800__p18701511266">comments</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.4.1.2 "><p id="mrs_01_24800__p5870311061">Description of the savepoint</p>
</td>
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.3 "><p id="mrs_01_24800__p587181111610">No</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_01_24800__en-us_topic_0265792787_s48d23baacfa245edaf9586eb4ed766d6"><h4 class="sectiontitle">Example</h4><pre class="screen" id="mrs_01_24800__screen168131147123417">call create_savepoints('hudi_test1', '20220908155421949');
call show_savepoints(table =&gt;'hudi_test1');
call rollback_savepoints('hudi_test1', '20220908155421949');</pre>
</div>
<div class="section" id="mrs_01_24800__section119711322145414"><h4 class="sectiontitle">Precautions</h4><ul id="mrs_01_24800__ul2636151715555"><li id="mrs_01_24800__li116363176552">MOR tables do not support savepoints.</li><li id="mrs_01_24800__li1297912110151">The commit-related files before the latest savepoint are not cleaned.</li><li id="mrs_01_24800__li2983101117571">If there are multiple savepoints, perform the rollback from the latest savepoint. The logic is as follows: roll back the latest savepoint; delete the savepoint; and roll back the next savepoint.</li></ul>
</div>
<div class="section" id="mrs_01_24800__en-us_topic_0265792787_s3bdfd790912444eaa61e25c34d4fbe0b"><h4 class="sectiontitle">System Response</h4><p id="mrs_01_24800__en-us_topic_0265792787_a023bbb240c584e7ba4b2b2c7981f64b9">You can view query results on the client.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24739.html">CALL COMMAND</a></div>
</div>
</div>