forked from docs/doc-exports
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>
51 lines
5.1 KiB
HTML
51 lines
5.1 KiB
HTML
<a name="mrs_01_24275"></a><a name="mrs_01_24275"></a>
|
|
|
|
<h1 class="topictitle1">UPDATE Hudi Data</h1>
|
|
<div id="body8662426"><div class="section" id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_s56e6e636e92d4e25ba86171d168a0097"><h4 class="sectiontitle">Function</h4><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_a36526b302fb741da8affa982ede0120e">This command is used to update the Hudi table based on the column expression and optional filtering conditions.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_sc17acc5cdde24923afe02ad70c5af9a1"><h4 class="sectiontitle">Syntax</h4><p id="mrs_01_24275__en-us_topic_0000001173949166_p418465132518"><strong id="mrs_01_24275__en-us_topic_0000001173949166_b3999151785819">UPDATE</strong> <em id="mrs_01_24275__en-us_topic_0000001173949166_i87812022105811">tableIdentifier SET column = EXPRESSION(,column = EXPRESSION) [ WHERE boolExpression]</em></p>
|
|
</div>
|
|
<div class="section" id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_s237e949a91f645afb133fa8ff1fb3a30"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_tbf6ea26f1d504556bc00eb71921b92b0" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_rddbab88c4e884027b074774928deec85"><th align="left" class="cellrowborder" valign="top" width="23.68%" id="mcps1.3.3.2.2.3.1.1"><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_abdf5d12b11d4467b97baafd3fcebca8a">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="76.32%" id="mcps1.3.3.2.2.3.1.2"><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_ab3ad580270924283937a10d484199525">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_r34842d652b5a49c59aca88bb0efdaaed"><td class="cellrowborder" valign="top" width="23.68%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_a415fa4ab88554922af1ee1285180ce94">tableIdentifier</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.32%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_ac9347142ecb343fea4e8122e01b659b5">Name of the Hudi table to be updated.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_r0166cc86ce3746eaa8c8928e6c025dfa"><td class="cellrowborder" valign="top" width="23.68%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_a85891954f0a74d868c132592dbd9058c">column</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.32%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_a03ee028b6d254b31a7e4c55a25c89dd8">Target column to be updated.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_r64bff89c5c8a4ae6892cb5a840fffb35"><td class="cellrowborder" valign="top" width="23.68%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_a4510eadd622d4c0a801314f75c488055">EXPRESSION</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.32%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_aa6bd0f68abfc4790b37d9f105798cb8c">Expression of the source table column to be updated in the target table.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_rb8c1d302640a4adba6c2d6734fc67c64"><td class="cellrowborder" valign="top" width="23.68%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_ab1fb0c8c5f6e43b5b114c95c03c61d33">boolExpression</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="76.32%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_ab1c5ec4aea1b4c27a7d82ad2c09dad28">Filtering condition expression.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_sb848b6b6f29c4ca89355bd1310c46e8b"><h4 class="sectiontitle">Examples</h4><pre class="screen" id="mrs_01_24275__en-us_topic_0000001173949166_screen1431234065816">update h0 set price = price + 20 where id = 1;
|
|
update h0 set price = price *2, name = 'a2' where id = 2;</pre>
|
|
</div>
|
|
<div class="section" id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_s49b19580d9be445b92aafa75822ad7a2"><h4 class="sectiontitle">System Response</h4><p id="mrs_01_24275__en-us_topic_0000001173949166_en-us_topic_0265792798_a14f5dd2a5132480991d1f4c428544d79">You can view the result in driver logs or on the client.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24272.html">Hudi DML</a></div>
|
|
</div>
|
|
</div>
|
|
|