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

148 lines
17 KiB
HTML

<a name="mrs_01_24023"></a><a name="mrs_01_24023"></a>
<h1 class="topictitle1">Managing Tables on the Flink Web UI</h1>
<div id="body0000001127053965"><div class="section" id="mrs_01_24023__s9f93d0a70cdc4575b48c96902a562dfe"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_24023__p7684161264218">Data tables can be used to define basic attributes and parameters of source tables, dimension tables, and output tables.</p>
</div>
<div class="section" id="mrs_01_24023__section1746418521537"><h4 class="sectiontitle">Creating a Stream Table</h4><ol id="mrs_01_24023__ol10782141514100"><li id="mrs_01_24023__li17782181511106"><span>Access the Flink web UI. For details, see <a href="mrs_01_24019.html">Accessing the Flink Web UI</a>.</span></li><li id="mrs_01_24023__li63513497107"><span>Click <strong id="mrs_01_24023__b1117874218231">Table Management</strong>. The table management page is displayed.</span></li><li id="mrs_01_24023__li421653931519"><span>Click <strong id="mrs_01_24023__b04844332245">Create Stream Table</strong>. On the stream table creation page, set parameters by referring to <a href="#mrs_01_24023__table205858588169">Table 1</a> and click <strong id="mrs_01_24023__b960635642515">OK</strong>.</span><p>
<div class="tablenoborder"><a name="mrs_01_24023__table205858588169"></a><a name="table205858588169"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24023__table205858588169" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters for creating a stream table</caption><thead align="left"><tr id="mrs_01_24023__row17586858111618"><th align="left" class="cellrowborder" valign="top" width="15.920000000000002%" id="mcps1.3.2.2.3.2.1.2.4.1.1"><p id="mrs_01_24023__p2058617580164">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59.81999999999999%" id="mcps1.3.2.2.3.2.1.2.4.1.2"><p id="mrs_01_24023__p1158618583165">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.26%" id="mcps1.3.2.2.3.2.1.2.4.1.3"><p id="mrs_01_24023__p1758616584161">Remarks</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_24023__row95861858191610"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p175869586169">Stream/Table Name</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p2058675815165">Stream/Table name, which can contain 1 to 64 characters. Only letters, digits, and underscores (_) are allowed.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p4586658181618">Example: <strong id="mrs_01_24023__b19430184632713">flink_sink</strong></p>
</td>
</tr>
<tr id="mrs_01_24023__row058685881612"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p6586115810169">Description</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p115866588164">Stream/Table description information, which can contain 1 to 1024 characters.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p10586105815169">-</p>
</td>
</tr>
<tr id="mrs_01_24023__row175862058121616"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p1958695891611">Mapping Table Type</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p15585954113516">Flink SQL does not provide the data storage function. Table creation is actually the creation of mapping for external data tables or storage.</p>
<p id="mrs_01_24023__p185871058101616">The value can be <strong id="mrs_01_24023__b939131717565">Kafka</strong> or <strong id="mrs_01_24023__b6379419125620">HDFS</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p205877582160">-</p>
</td>
</tr>
<tr id="mrs_01_24023__row8587175816160"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p058745831618">Type</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p1049854153613">Includes data source table <strong id="mrs_01_24023__b28712019720">Source</strong> and data result table <strong id="mrs_01_24023__b1895130175">Sink</strong>. Tables included in different mapping table types are as follows:</p>
<ul id="mrs_01_24023__ul71213189386"><li id="mrs_01_24023__li812110180387">Kafka: <strong id="mrs_01_24023__b7531194614413">Source</strong> and <strong id="mrs_01_24023__b18831194715417">Sink</strong></li><li id="mrs_01_24023__li1112151816382">HDFS: <strong id="mrs_01_24023__b137402531848">Source</strong> and <strong id="mrs_01_24023__b179855913419">Sink</strong></li></ul>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p8587145871618">-</p>
</td>
</tr>
<tr id="mrs_01_24023__row195878588168"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p10587758121613">Data Connection</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p115872586161">Name of the data connection.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p12587458191614">-</p>
</td>
</tr>
<tr id="mrs_01_24023__row158713587164"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p05876582168">Topic</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p195871258121610">Kafka topic to be read. Multiple Kafka topics can be read. Use separators to separate topics.</p>
<p id="mrs_01_24023__p13773132152713">This parameter is available when <strong id="mrs_01_24023__b123639104819">Mapping Table Type</strong> is set to <strong id="mrs_01_24023__b47341412789">Kafka</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p205871582161">-</p>
</td>
</tr>
<tr id="mrs_01_24023__row9587358161613"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p7587115812166">File Path</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p145871458171615">HDFS directory or a single file path to be transferred.</p>
<p id="mrs_01_24023__p17532204052720">This parameter is available when <strong id="mrs_01_24023__b209707718911">Mapping Table Type</strong> is set to <strong id="mrs_01_24023__b1997515710917">HDFS</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p69104128528">Example:</p>
<p id="mrs_01_24023__p195871058171616"><strong id="mrs_01_24023__b091312518916">/user/sqoop/</strong> or <strong id="mrs_01_24023__b14516311999">/user/sqoop/example.csv</strong></p>
</td>
</tr>
<tr id="mrs_01_24023__row17834115718409"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p188343574409">Code</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p1451314356220">Codes corresponding to different mapping table types are as follows:</p>
<ul id="mrs_01_24023__ul515520754113"><li id="mrs_01_24023__li715547114117">Kafka: <strong id="mrs_01_24023__b1598319486102">CSV</strong> and <strong id="mrs_01_24023__b187421650171014">JSON</strong></li><li id="mrs_01_24023__li415527134111">HDFS: <strong id="mrs_01_24023__b131853121017">CSV</strong></li></ul>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p168344571408">-</p>
</td>
</tr>
<tr id="mrs_01_24023__row68736381263"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p287413387262">Prefix</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p987443812612">When <strong id="mrs_01_24023__b134764203710">Mapping Table Type</strong> is set to <strong id="mrs_01_24023__b1047711210372">Kafka</strong>, <strong id="mrs_01_24023__b1047713233720">Type</strong> is set to <strong id="mrs_01_24023__b6477722374">Source</strong>, and <strong id="mrs_01_24023__b13477172173710">Code</strong> is set to <strong id="mrs_01_24023__b1847752193712">JSON</strong>, this parameter indicates the hierarchical prefixes of multi-layer nested JSON, which are separated by commas (,).</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p11874203892610">For example, <strong id="mrs_01_24023__b273271211">data,info</strong> indicates that the content under <strong id="mrs_01_24023__b138827152119">data</strong> and <strong id="mrs_01_24023__b18132772116">info</strong> in the nested JSON file is used as the data input in JSON format.</p>
</td>
</tr>
<tr id="mrs_01_24023__row199911921171910"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p14991142111197">Separator</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p9237152112520">Has different meanings when <strong id="mrs_01_24023__b14797122533117">Mapping Table Type</strong> is set to the following values: It is used as the separator of specified CSV fields. This parameter is available only when <strong id="mrs_01_24023__b4596230152816">Code</strong> is set to <strong id="mrs_01_24023__b9626235289">CSV</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p1499122161914">Example: comma (<strong id="mrs_01_24023__b1333187192919">,</strong>)</p>
</td>
</tr>
<tr id="mrs_01_24023__row531141691917"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p17321616111914">Row Separator</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p7322162194">Line break in the file, including <strong id="mrs_01_24023__b338014414303">\r</strong>, <strong id="mrs_01_24023__b1467112615303">\n</strong>, and <strong id="mrs_01_24023__b2608121153013">\r\n</strong>.</p>
<p id="mrs_01_24023__p141735703513">This parameter is available when <strong id="mrs_01_24023__b8969345173019">Mapping Table Type</strong> is set to <strong id="mrs_01_24023__b915847193011">HDFS</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p1318319328237">-</p>
</td>
</tr>
<tr id="mrs_01_24023__row095742211393"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p9957112219398">Column Separator</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p10957172243918">Field separator in the file.</p>
<p id="mrs_01_24023__p13449915163616">This parameter is available when <strong id="mrs_01_24023__b152712233319">Mapping Table Type</strong> is set to <strong id="mrs_01_24023__b033152310317">HDFS</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p595715227392">Example: comma (<strong id="mrs_01_24023__b149886288323">,</strong>)</p>
</td>
</tr>
<tr id="mrs_01_24023__row85381841912"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p11538189197">Stream Table Structure</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p185381688191">Stream/Table structure, including <strong id="mrs_01_24023__b1077016157368">Name</strong> and <strong id="mrs_01_24023__b299731683612">Type</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p453810821911">-</p>
</td>
</tr>
<tr id="mrs_01_24023__row17711145293917"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p137111352183918">Proctime</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p2711175293914">System time, which is irrelevant to the data timestamp. That is, the time when the calculation is complete in Flink operators.</p>
<p id="mrs_01_24023__p1405163873412">This parameter is available when <strong id="mrs_01_24023__b6532194143817">Type</strong> is set to <strong id="mrs_01_24023__b1337186133819">Source</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p971155213391">-</p>
</td>
</tr>
<tr id="mrs_01_24023__row271313569396"><td class="cellrowborder" valign="top" width="15.920000000000002%" headers="mcps1.3.2.2.3.2.1.2.4.1.1 "><p id="mrs_01_24023__p147131056153918">Event Time</p>
</td>
<td class="cellrowborder" valign="top" width="59.81999999999999%" headers="mcps1.3.2.2.3.2.1.2.4.1.2 "><p id="mrs_01_24023__p071319569391">Time when an event is generated, that is, the timestamp generated during data generation.</p>
<p id="mrs_01_24023__p111134663415">This parameter is available when <strong id="mrs_01_24023__b62141319405">Type</strong> is set to <strong id="mrs_01_24023__b22271374010">Source</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.2.2.3.2.1.2.4.1.3 "><p id="mrs_01_24023__p11713205612390">-</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li></ol>
</div>
<div class="section" id="mrs_01_24023__section1046945219530"><h4 class="sectiontitle">Editing a Stream Table</h4><ol id="mrs_01_24023__ol14500192833618"><li id="mrs_01_24023__li229653873613"><span>Access the Flink web UI. For details, see <a href="mrs_01_24019.html">Accessing the Flink Web UI</a>.</span></li><li id="mrs_01_24023__li15296153833610"><span>Click <strong id="mrs_01_24023__b117688411436">Table Management</strong>. The table management page is displayed.</span></li><li id="mrs_01_24023__li8522134012367"><span>In the <strong id="mrs_01_24023__b1987694374012">Operation</strong> column of the item to be modified, click <strong id="mrs_01_24023__b18815431408">Edit</strong>. On the displayed page, modify the stream table information by referring to <a href="#mrs_01_24023__table205858588169">Table 1</a> and click <strong id="mrs_01_24023__b1588134304019">OK</strong>.</span></li></ol>
</div>
<div class="section" id="mrs_01_24023__section1897053010111"><h4 class="sectiontitle">Searching for a stream table</h4><ol id="mrs_01_24023__ol15610618716"><li id="mrs_01_24023__li106105185114"><span>Access the Flink web UI. For details, see <a href="mrs_01_24019.html">Accessing the Flink Web UI</a>.</span></li><li id="mrs_01_24023__li106101818610"><span>Click <strong id="mrs_01_24023__b59951114114311">Table Management</strong>. The table management page is displayed.</span></li><li id="mrs_01_24023__li7610171814118"><span>In the upper right corner of the page, you can enter a keyword to search for stream table information.</span></li></ol>
</div>
<div class="section" id="mrs_01_24023__section78816534119"><h4 class="sectiontitle">Deleting a Stream Table</h4><ol id="mrs_01_24023__ol20610121811112"><li id="mrs_01_24023__li8610151810113"><span>Access the Flink web UI. For details, see <a href="mrs_01_24019.html">Accessing the Flink Web UI</a>.</span></li><li id="mrs_01_24023__li146105181917"><span>Click <strong id="mrs_01_24023__b102028257431">Table Management</strong>. The table management page is displayed.</span></li><li id="mrs_01_24023__li56101018315"><span>In the <strong id="mrs_01_24023__b666112714439">Operation</strong> column of the item to be deleted, click <strong id="mrs_01_24023__b12666192715437">Delete</strong>, and click <strong id="mrs_01_24023__b1066672716436">OK</strong> in the displayed page.</span></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24014.html">Using the Flink Web UI</a></div>
</div>
</div>