forked from docs/doc-exports
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>
83 lines
6.0 KiB
HTML
83 lines
6.0 KiB
HTML
<a name="dli_08_15029"></a><a name="dli_08_15029"></a>
|
|
|
|
<h1 class="topictitle1">BlackHole</h1>
|
|
<div id="body0000001784712433"><div class="section" id="dli_08_15029__section1690311610180"><h4 class="sectiontitle">Function</h4><p id="dli_08_15029__p2972193021813">The BlackHole connector allows for swallowing all input records. It is designed for high-performance testing and UDF output. It is not a substantive sink. The BlackHole result table is a built-in connector.</p>
|
|
<p id="dli_08_15029__p1563744510250">For example, if an error is reported when you register a result table of another type, but you are not sure whether it is caused by a system fault or an invalid setting of the <strong id="dli_08_15029__b192831494043155">WITH</strong> parameter for the result table, you can change the value of <strong id="dli_08_15029__b179323949143155">connector</strong> to <strong id="dli_08_15029__b74784967043155">blackhole</strong> and click <strong id="dli_08_15029__b161629578543155">Run</strong>. If no error is reported, the system is normal. You must check the settings of the <strong id="dli_08_15029__b91949248143155">WITH</strong> parameter.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_15029__table3954102713514" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Supported types</caption><thead align="left"><tr id="dli_08_15029__row139551727153515"><th align="left" class="cellrowborder" valign="top" width="33.87%" id="mcps1.3.1.4.2.3.1.1"><p id="dli_08_15029__p169550272355">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="66.13%" id="mcps1.3.1.4.2.3.1.2"><p id="dli_08_15029__p9955172713520">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_15029__row595518271358"><td class="cellrowborder" valign="top" width="33.87%" headers="mcps1.3.1.4.2.3.1.1 "><p id="dli_08_15029__p4955182716353">Supported Table Types</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="66.13%" headers="mcps1.3.1.4.2.3.1.2 "><p id="dli_08_15029__p1595518273356">Result table</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_08_15029__section148237491187"><h4 class="sectiontitle">Caveats</h4><ul id="dli_08_15029__ul17647145194019"><li id="dli_08_15029__li81632311440">When you create a Flink OpenSource SQL job, set <strong id="dli_08_15029__b163001353185217">Flink Version</strong> to <strong id="dli_08_15029__b1430115539523">1.15</strong> in the <strong id="dli_08_15029__b1030175315523">Running Parameters</strong> tab. Select <strong id="dli_08_15029__b430135325212">Save Job Log</strong>, and specify the OBS bucket for saving job logs.</li><li id="dli_08_15029__li980192610493">Storing authentication credentials such as usernames and passwords in code or plaintext poses significant security risks. It is recommended using DEW to manage credentials instead. Storing encrypted credentials in configuration files or environment variables and decrypting them when needed ensures security. For details, see .</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_08_15029__section957685241810"><h4 class="sectiontitle">Syntax</h4><pre class="screen" id="dli_08_15029__screen16381051114519">create table blackhole_table (
|
|
attr_name attr_type (',' attr_name attr_type) *
|
|
) with (
|
|
'connector' = 'blackhole'
|
|
);</pre>
|
|
</div>
|
|
<div class="section" id="dli_08_15029__section144601444141917"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_15029__table11150132674218" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter</caption><thead align="left"><tr id="dli_08_15029__row1315012260424"><th align="left" class="cellrowborder" valign="top" width="15.03%" id="mcps1.3.4.2.2.6.1.1"><p id="dli_08_15029__p1615010263424">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.45%" id="mcps1.3.4.2.2.6.1.2"><p id="dli_08_15029__p13151182610428">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="26.490000000000002%" id="mcps1.3.4.2.2.6.1.3"><p id="dli_08_15029__p1559183013435">Default Value</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.75%" id="mcps1.3.4.2.2.6.1.4"><p id="dli_08_15029__p13151132654213">Data Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.28%" id="mcps1.3.4.2.2.6.1.5"><p id="dli_08_15029__p7632058174317">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_08_15029__row16151202694216"><td class="cellrowborder" valign="top" width="15.03%" headers="mcps1.3.4.2.2.6.1.1 "><p id="dli_08_15029__p147914223449">connector</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.45%" headers="mcps1.3.4.2.2.6.1.2 "><p id="dli_08_15029__p1600926144412">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.490000000000002%" headers="mcps1.3.4.2.2.6.1.3 "><p id="dli_08_15029__p13132205564220">None</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.75%" headers="mcps1.3.4.2.2.6.1.4 "><p id="dli_08_15029__p715119269424">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.28%" headers="mcps1.3.4.2.2.6.1.5 "><p id="dli_08_15029__p56331658154318">Connector to be used. Set this parameter to <strong id="dli_08_15029__b172339663743155">blackhole</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_08_15029__section2065545012199"><h4 class="sectiontitle">Example</h4><p id="dli_08_15029__p1235813299414">The DataGen source table generates data, and the BlackHole result table receives the data.</p>
|
|
<pre class="screen" id="dli_08_15029__screen768166163112">create table datagenSource (
|
|
user_id string,
|
|
user_name string,
|
|
user_age int
|
|
) with (
|
|
'connector' = 'datagen',
|
|
'rows-per-second'='1'
|
|
);
|
|
create table blackholeSink (
|
|
user_id string,
|
|
user_name string,
|
|
user_age int
|
|
) with (
|
|
'connector' = 'blackhole'
|
|
);
|
|
insert into blackholeSink select * from datagenSource;</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_08_15027.html">Connectors</a></div>
|
|
</div>
|
|
</div>
|
|
|