doc-exports/docs/dli/sqlreference/dli_08_0314.html
Su, Xiaomeng 04d4597cf3 dli_sqlreference_0511_version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2023-11-02 14:34:08 +00:00

101 lines
10 KiB
HTML

<a name="dli_08_0314"></a><a name="dli_08_0314"></a>
<h1 class="topictitle1">SMN Result Table</h1>
<div id="body8662426"><div class="section" id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_section7845211184217"><h4 class="sectiontitle">Function</h4><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p14926453425">DLI exports Flink job output data to SMN.</p>
<p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p449211457428">SMN provides reliable and flexible large-scale message notification services to DLI. It significantly simplifies system coupling and pushes messages to subscription endpoints based on requirements. SMN can be connected to other cloud services or integrated with any application that uses or generates message notifications to push messages over multiple protocols. </p>
</div>
<div class="section" id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_section282817165437"><h4 class="sectiontitle">Syntax</h4><pre class="screen" id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_screen1314151574419">create table smnSink (
attr_name attr_type
(',' attr_name attr_type)*
(','PRIMARY KEY (attr_name, ...) NOT ENFORCED)
)
with (
'connector.type' = 'smn',
'connector.region' = '',
'connector.topic-urn' = '',
'connector.message-subject' = '',
'connector.message-column' = ''
);</pre>
</div>
<div class="section" id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_section10719114315473"><h4 class="sectiontitle">Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_table855116464817" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_row18551204134811"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.2.2.4.1.1"><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p15551134194814">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.500950095009502%" id="mcps1.3.3.2.2.4.1.2"><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p175519424813">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.165716571657164%" id="mcps1.3.3.2.2.4.1.3"><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p195511042485">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_row3551545488"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.1 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p195515434811">connector.type</p>
</td>
<td class="cellrowborder" valign="top" width="9.500950095009502%" headers="mcps1.3.3.2.2.4.1.2 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p85514418481">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="57.165716571657164%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p135511045485">Sink data type. Set this parameter to <strong id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_b842352706194212">smn</strong>, which means that data is stored to SMN.</p>
</td>
</tr>
<tr id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_row95513454820"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.1 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p185515419489">connector.region</p>
</td>
<td class="cellrowborder" valign="top" width="9.500950095009502%" headers="mcps1.3.3.2.2.4.1.2 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p45511748482">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="57.165716571657164%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p115519444814">Region where SMN belongs</p>
</td>
</tr>
<tr id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_row1255112494811"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.1 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p195511247482">connector.topic-urn</p>
</td>
<td class="cellrowborder" valign="top" width="9.500950095009502%" headers="mcps1.3.3.2.2.4.1.2 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p1355211484816">No</p>
</td>
<td class="cellrowborder" valign="top" width="57.165716571657164%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p13814281506">URN of an SMN topic, which is used for the static topic URN configuration. The SMN topic serves as the destination for short message notification and needs to be created in SMN.</p>
<p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p1338122819504"></p>
<p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p4381628205016">Either of <strong id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_b95594192217">topic_urn</strong> and <strong id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_b756641102215">urn_column</strong> must be configured. If both of them are configured, the <strong id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_b158114117225">topic_urn</strong> setting takes precedence.</p>
</td>
</tr>
<tr id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_row115521348489"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.1 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p135529494815">connector.urn-column</p>
</td>
<td class="cellrowborder" valign="top" width="9.500950095009502%" headers="mcps1.3.3.2.2.4.1.2 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p85526484814">No</p>
</td>
<td class="cellrowborder" valign="top" width="57.165716571657164%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p16333137145016">Field name of the topic URN content, which is used for the dynamic topic URN configuration.</p>
<p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p203338377508"></p>
<p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p16333837175015">One of <strong id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_b19738135582319">topic_urn</strong> and <strong id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_b127407559239">urn_column</strong> must be configured. If both of them are configured, the <strong id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_b67411955132312">topic_urn</strong> setting takes precedence.</p>
</td>
</tr>
<tr id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_row95520444815"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.1 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p25528404819">connector.message-subject</p>
</td>
<td class="cellrowborder" valign="top" width="9.500950095009502%" headers="mcps1.3.3.2.2.4.1.2 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p65521943485">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="57.165716571657164%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p455224154814">Message subject sent by SMN. This parameter can be customized.</p>
</td>
</tr>
<tr id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_row755218414482"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.2.4.1.1 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p205521044480">connector.message-column</p>
</td>
<td class="cellrowborder" valign="top" width="9.500950095009502%" headers="mcps1.3.3.2.2.4.1.2 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p1055210416485">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="57.165716571657164%" headers="mcps1.3.3.2.2.4.1.3 "><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p65521444811">Column name in the current table. Data in this column is the message content and is customized. Currently, only text messages are supported.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_section1066018645112"><h4 class="sectiontitle">Precautions</h4><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p188311496519">None</p>
</div>
<div class="section" id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_section73451217125118"><h4 class="sectiontitle">Example</h4><p id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_p4412020105118">Write the data to the target of SMN topic. The topic of the message sent by SMN is <strong id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_b1092364352610">test</strong>, and the message content is the data in the <strong id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_b7213100275">attr1</strong> column.</p>
<pre class="screen" id="dli_08_0314__en-us_topic_0000001166031875_en-us_topic_0000001102467384_screen24618365215">create table smnSink (
attr1 STRING,
attr2 STRING
)
with (
'connector.type' = 'smn',
'connector.region' = '',
'connector.topic-urn' = 'xxxxxx',
'connector.message-subject' = 'test',
'connector.message-column' = 'attr1'
);</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_08_0307.html">Creating a Result Table</a></div>
</div>
</div>