Files
doc-exports/docs/dli/sqlreference/dli_08_15021.html
Su, Xiaomeng be9eabe464 dli_sqlreference_20250305
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>
2025-03-25 09:06:21 +00:00

257 lines
21 KiB
HTML

<a name="dli_08_15021"></a><a name="dli_08_15021"></a>
<h1 class="topictitle1">JSON</h1>
<div id="body0000001262335938"><div class="section" id="dli_08_15021__section18194105273210"><h4 class="sectiontitle">Function</h4><p id="dli_08_15021__p1352145614326">The JSON format allows you to read and write JSON data based on a JSON schema. Currently, the JSON schema is derived from table schema. For details, see <a href="https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/connectors/table/formats/json/" target="_blank" rel="noopener noreferrer">JSON Format</a>.</p>
</div>
<div class="section" id="dli_08_15021__section340211663317"><h4 class="sectiontitle">Supported Connectors</h4><ul id="dli_08_15021__ul1741845193412"><li id="dli_08_15021__li147412457348">Kafka</li><li id="dli_08_15021__li574124553416">Upsert Kafka</li><li id="dli_08_15021__li774184583413">Elasticsearch</li></ul>
</div>
<div class="section" id="dli_08_15021__section196716720333"><h4 class="sectiontitle">Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_15021__table1800141133610" frame="border" border="1" rules="all"><caption><b>Table 1 </b></caption><thead align="left"><tr id="dli_08_15021__row980114133620"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.6.1.1"><p id="dli_08_15021__p38010113364">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.81%" id="mcps1.3.3.2.2.6.1.2"><p id="dli_08_15021__p4801131173614">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.03%" id="mcps1.3.3.2.2.6.1.3"><p id="dli_08_15021__p1380113133611">Default Value</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.34%" id="mcps1.3.3.2.2.6.1.4"><p id="dli_08_15021__p138011813366">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.82%" id="mcps1.3.3.2.2.6.1.5"><p id="dli_08_15021__p108012115361">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_08_15021__row78019117363"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.6.1.1 "><p id="dli_08_15021__p234420229377">format</p>
</td>
<td class="cellrowborder" valign="top" width="11.81%" headers="mcps1.3.3.2.2.6.1.2 "><p id="dli_08_15021__p193441922133712">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="10.03%" headers="mcps1.3.3.2.2.6.1.3 "><p id="dli_08_15021__p134452243717">None</p>
</td>
<td class="cellrowborder" valign="top" width="14.34%" headers="mcps1.3.3.2.2.6.1.4 "><p id="dli_08_15021__p934452293712">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.82%" headers="mcps1.3.3.2.2.6.1.5 "><p id="dli_08_15021__p7344122210373">Format to be used. Set this parameter to <strong id="dli_08_15021__b1028295616250">json</strong>.</p>
</td>
</tr>
<tr id="dli_08_15021__row9801171183617"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.6.1.1 "><p id="dli_08_15021__p193447229372">json.fail-on-missing-field</p>
</td>
<td class="cellrowborder" valign="top" width="11.81%" headers="mcps1.3.3.2.2.6.1.2 "><p id="dli_08_15021__p7344722123711">No</p>
</td>
<td class="cellrowborder" valign="top" width="10.03%" headers="mcps1.3.3.2.2.6.1.3 "><p id="dli_08_15021__p3344322193717">false</p>
</td>
<td class="cellrowborder" valign="top" width="14.34%" headers="mcps1.3.3.2.2.6.1.4 "><p id="dli_08_15021__p1734417228374">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="43.82%" headers="mcps1.3.3.2.2.6.1.5 "><p id="dli_08_15021__p19344152273718">Whether missing fields and rows will be skipped or failed. The default value is <strong id="dli_08_15021__b9376762271">false</strong>, indicating that an error will be thrown.</p>
</td>
</tr>
<tr id="dli_08_15021__row198012183611"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.6.1.1 "><p id="dli_08_15021__p2344192273710">json.ignore-parse-errors</p>
</td>
<td class="cellrowborder" valign="top" width="11.81%" headers="mcps1.3.3.2.2.6.1.2 "><p id="dli_08_15021__p23441122113710">No</p>
</td>
<td class="cellrowborder" valign="top" width="10.03%" headers="mcps1.3.3.2.2.6.1.3 "><p id="dli_08_15021__p183441122163710">false</p>
</td>
<td class="cellrowborder" valign="top" width="14.34%" headers="mcps1.3.3.2.2.6.1.4 "><p id="dli_08_15021__p153441622123711">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="43.82%" headers="mcps1.3.3.2.2.6.1.5 "><p id="dli_08_15021__p03442022103711">Whether fields and rows with parse errors will be skipped or failed. The default value is <strong id="dli_08_15021__b1864941412717">false</strong>, indicating that an error will be thrown. Fields are set to null in case of errors.</p>
</td>
</tr>
<tr id="dli_08_15021__row380112183611"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.6.1.1 "><p id="dli_08_15021__p93445222373">json.timestamp-format.standard</p>
</td>
<td class="cellrowborder" valign="top" width="11.81%" headers="mcps1.3.3.2.2.6.1.2 "><p id="dli_08_15021__p1634462213374">No</p>
</td>
<td class="cellrowborder" valign="top" width="10.03%" headers="mcps1.3.3.2.2.6.1.3 "><p id="dli_08_15021__p111861849154716">'SQL'</p>
</td>
<td class="cellrowborder" valign="top" width="14.34%" headers="mcps1.3.3.2.2.6.1.4 "><p id="dli_08_15021__p16344222143717">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.82%" headers="mcps1.3.3.2.2.6.1.5 "><div class="p" id="dli_08_15021__p13159042185013">Specify the input and output timestamp format for <strong id="dli_08_15021__b15925333112717">TIMESTAMP</strong> and <strong id="dli_08_15021__b133437363271">TIMESTAMP_LTZ</strong> type. Currently supported values are <strong id="dli_08_15021__b213527469862012">SQL</strong> and <strong id="dli_08_15021__b131022759362012">ISO-8601</strong>:<ul id="dli_08_15021__ul840263255019"><li id="dli_08_15021__li040213323505">Option <strong id="dli_08_15021__b16473050112912">SQL</strong> will parse input <strong id="dli_08_15021__b0881185772917">TIMESTAMP</strong> values in "yyyy-MM-dd HH:mm:ss.s{precision}" format, e.g "2020-12-30 12:13:14.123", parse input <strong id="dli_08_15021__b161011321123019">TIMESTAMP_LTZ</strong> values in "yyyy-MM-dd HH:mm:ss.s{precision}'Z'" format, e.g "2020-12-30 12:13:14.123Z", and output timestamp in the same format.</li><li id="dli_08_15021__li1540293225012">Option <strong id="dli_08_15021__b155485218309">ISO-8601</strong> will parse input <strong id="dli_08_15021__b54257566309">TIMESTAMP</strong> in "yyyy-MM-ddTHH:mm:ss.s{precision}" format, e.g "2020-12-30T12:13:14.123", parse input <strong id="dli_08_15021__b1934432417319">TIMESTAMP_LTZ</strong> in "yyyy-MM-ddTHH:mm:ss.s{precision}'Z'" format, e.g "2020-12-30T12:13:14.123Z", and output timestamp in the same format.</li></ul>
</div>
</td>
</tr>
<tr id="dli_08_15021__row8863131112372"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.6.1.1 "><p id="dli_08_15021__p103441422153713">json.map-null-key.mode</p>
</td>
<td class="cellrowborder" valign="top" width="11.81%" headers="mcps1.3.3.2.2.6.1.2 "><p id="dli_08_15021__p6344722153710">No</p>
</td>
<td class="cellrowborder" valign="top" width="10.03%" headers="mcps1.3.3.2.2.6.1.3 "><p id="dli_08_15021__p849282114476">'FALL'</p>
</td>
<td class="cellrowborder" valign="top" width="14.34%" headers="mcps1.3.3.2.2.6.1.4 "><p id="dli_08_15021__p034422211375">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.82%" headers="mcps1.3.3.2.2.6.1.5 "><p id="dli_08_15021__p4344132243712">Handling mode when serializing null keys for map data. Available values are as follows:</p>
<ul id="dli_08_15021__ul83441822133717"><li id="dli_08_15021__li1134402214377"><strong id="dli_08_15021__b378121118534">FAIL</strong> will throw exception when encountering map value with null key.</li><li id="dli_08_15021__li103441022163715"><strong id="dli_08_15021__b754131316538">DROP</strong> will drop null key entries for map data.</li><li id="dli_08_15021__li103441022193712"><strong id="dli_08_15021__b261319146531">LITERAL</strong> replaces the empty key value in the map with a string constant. The string literal is defined by <strong id="dli_08_15021__b67337157531">json.map-null-key.literal</strong> option.</li></ul>
</td>
</tr>
<tr id="dli_08_15021__row107485503619"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.6.1.1 "><p id="dli_08_15021__p23444222378">json.map-null-key.literal</p>
</td>
<td class="cellrowborder" valign="top" width="11.81%" headers="mcps1.3.3.2.2.6.1.2 "><p id="dli_08_15021__p6344622103713">No</p>
</td>
<td class="cellrowborder" valign="top" width="10.03%" headers="mcps1.3.3.2.2.6.1.3 "><p id="dli_08_15021__p16344142283712">'null'</p>
</td>
<td class="cellrowborder" valign="top" width="14.34%" headers="mcps1.3.3.2.2.6.1.4 "><p id="dli_08_15021__p153442022113711">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.82%" headers="mcps1.3.3.2.2.6.1.5 "><p id="dli_08_15021__p13344162223713">String literal to replace null key when <strong id="dli_08_15021__b144592695317">json.map-null-key.mode</strong> is <strong id="dli_08_15021__b174692614532">LITERAL</strong>.</p>
</td>
</tr>
<tr id="dli_08_15021__row9433621105115"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.6.1.1 "><p id="dli_08_15021__p763063635116">json.encode.decimal-as-plain-number</p>
</td>
<td class="cellrowborder" valign="top" width="11.81%" headers="mcps1.3.3.2.2.6.1.2 "><p id="dli_08_15021__p11433721185117">No</p>
</td>
<td class="cellrowborder" valign="top" width="10.03%" headers="mcps1.3.3.2.2.6.1.3 "><p id="dli_08_15021__p2043311212512">false</p>
</td>
<td class="cellrowborder" valign="top" width="14.34%" headers="mcps1.3.3.2.2.6.1.4 "><p id="dli_08_15021__p174331821165115">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="43.82%" headers="mcps1.3.3.2.2.6.1.5 "><p id="dli_08_15021__p12433182145116">Encode all decimals as plain numbers instead of possible scientific notations. For example, <strong id="dli_08_15021__b110032730345620">0.000000027</strong> is encoded as <strong id="dli_08_15021__b85431961945620">2.7E-8</strong> by default, and will be written as <strong id="dli_08_15021__b9914155984310">0.000000027</strong> if set this parameter to <strong id="dli_08_15021__b1991517595438">true</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_08_15021__section877585014521"><h4 class="sectiontitle">Data Type Mapping</h4><p id="dli_08_15021__p1837341155313">Currently, the JSON schema is always derived from table schema. Explicitly defining a JSON schema is not supported yet.</p>
<p id="dli_08_15021__p3373191145318">Flink JSON format uses <a href="https://github.com/FasterXML/jackson-databind" target="_blank" rel="noopener noreferrer">jackson databind API</a> to parse and generate JSON string.</p>
<p id="dli_08_15021__p163739135310">The following table lists the type mapping from Flink type to JSON type.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_08_15021__table39411928105314" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Data type mapping</caption><thead align="left"><tr id="dli_08_15021__row14941152811535"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.3.1.1"><p id="dli_08_15021__p8941628115315">Flink SQL Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.3.1.2"><p id="dli_08_15021__p19941172865318">JSON Type</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_08_15021__row1394111285537"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p18941112819534">CHAR/VARCHAR/STRING</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p6941152817539">String</p>
</td>
</tr>
<tr id="dli_08_15021__row10941182805318"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p794112815317">BOOLEAN</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p99411289538">Boolean</p>
</td>
</tr>
<tr id="dli_08_15021__row2941728145315"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p7941328135310">BINARY/VARBINARY</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p1394112865311">string with encoding: base64</p>
</td>
</tr>
<tr id="dli_08_15021__row09417284539"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p159416285536">DECIMAL</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p394112818537">Number</p>
</td>
</tr>
<tr id="dli_08_15021__row294162813539"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p094192810536">TINYINT</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p1794182815538">Number</p>
</td>
</tr>
<tr id="dli_08_15021__row794120289539"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p594110281539">SMALLINT</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p1394102810536">Number</p>
</td>
</tr>
<tr id="dli_08_15021__row3941182845318"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p14941128135314">INT</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p1194122817532">Number</p>
</td>
</tr>
<tr id="dli_08_15021__row1194119288531"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p394182816530">BIGINT</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p6941162816532">Number</p>
</td>
</tr>
<tr id="dli_08_15021__row1794242885310"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p9942162818534">FLOAT</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p2942162812534">Number</p>
</td>
</tr>
<tr id="dli_08_15021__row6942172845314"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p69428282537">DOUBLE</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p189421628125313">Number</p>
</td>
</tr>
<tr id="dli_08_15021__row5942102819538"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p894216282537">DATE</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p994212289531">string with format: date</p>
</td>
</tr>
<tr id="dli_08_15021__row6942428195310"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p1294211281537">TIME</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p1294202855312">string with format: time</p>
</td>
</tr>
<tr id="dli_08_15021__row15942172812538"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p199421328195320">TIMESTAMP</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p794222818531">string with format: date-time</p>
</td>
</tr>
<tr id="dli_08_15021__row79427289537"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p1494232816537">TIMESTAMP_WITH_LOCAL_TIME_ZONE</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p1494242810539">string with format: date-time (with UTC time zone)</p>
</td>
</tr>
<tr id="dli_08_15021__row1194292817535"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p794242825315">INTERVAL</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p5942162825315">Number</p>
</td>
</tr>
<tr id="dli_08_15021__row17942172816533"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p3942162895316">ARRAY</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p494242814531">array</p>
</td>
</tr>
<tr id="dli_08_15021__row3942192825317"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p1594282814532">MAP / MULTISET</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p2094210280537">object</p>
</td>
</tr>
<tr id="dli_08_15021__row1942182819531"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dli_08_15021__p16942828175311">ROW</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dli_08_15021__p19942102895314">object</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_08_15021__section15187174103312"><h4 class="sectiontitle">Example</h4><p id="dli_08_15021__p1326131081119">In this example, data is read from a topic and written to another using a Kafka sink.</p>
<ol id="dli_08_15021__ol6699140201216"><li id="dli_08_15021__li8699120181210"><span>Create a datasource connection for the communication with the VPC and subnet where Kafka locates and bind the connection to the queue. Set an inbound rule for the security group to allow access of the queue and test the connectivity using the Kafka address. If the connection is successful, the datasource is bound to the queue. Otherwise, the binding fails.</span></li><li id="dli_08_15021__li9843102821212"><span>Create a Flink OpenSource SQL job, select Flink 1.15, and allow DLI to save job logs in OBS. Use the following statement in the job and submit it:</span><p><pre class="screen" id="dli_08_15021__screen550720113134">CREATE TABLE kafkaSource (
order_id string,
order_channel string,
order_time string,
pay_amount double,
real_pay double,
pay_time string,
user_id string,
user_name string,
area_id string
) WITH (
'connector' = 'kafka',
'topic' = '<em id="dli_08_15021__i632065315202"><strong id="dli_08_15021__b1491165262012">kafkaTopic</strong></em>',
'properties.bootstrap.servers' = '<em id="dli_08_15021__i366724417446"><strong id="dli_08_15021__b1466716449449">KafkaAddress1:KafkaPort,KafkaAddress2:KafkaPort</strong></em>',
'properties.group.id' = '<em id="dli_08_15021__i088441162110"><strong id="dli_08_15021__b9462510152112">GroupId</strong></em>',
'scan.startup.mode' = 'latest-offset',
'format' = 'json'
);
CREATE TABLE printSink (
order_id string,
order_channel string,
order_time string,
pay_amount double,
real_pay double,
pay_time string,
user_id string,
user_name string,
area_id string
) WITH (
'connector' = 'print'
);
insert into printSink select * from kafkaSource;</pre>
</p></li><li id="dli_08_15021__li3301119171318"><span>Insert the following data into the source Kafka topic:</span><p><pre class="screen" id="dli_08_15021__screen1643116512133">{"order_id":"202103241000000001","order_channel":"webShop","order_time":"2021-03-24 10:00:00","pay_amount":100.0,"real_pay":100.0,"pay_time":"2021-03-24 10:02:03","user_id":"0001","user_name":"Alice","area_id":"330106"}
{"order_id":"202103241606060001","order_channel":"appShop","order_time":"2021-03-24 16:06:06","pay_amount":200.0,"real_pay":180.0,"pay_time":"2021-03-24 16:10:06","user_id":"0001","user_name":"Alice","area_id":"330106"}</pre>
</p></li><li id="dli_08_15021__li4353143193117"><span>Perform the following operations to view the data result in the <strong id="dli_08_15021__b1606194979271">taskmanager.out</strong> file:</span><p><ol type="a" id="dli_08_15021__ol864115198285"><li id="dli_08_15021__li10901621122819">Log in to the DLI console. In the navigation pane, choose <strong id="dli_08_15021__b209900300091923">Job Management</strong> &gt; <strong id="dli_08_15021__b91601354691923">Flink Jobs</strong>.</li><li id="dli_08_15021__li1912163912282">Click the name of the corresponding Flink job, choose <strong id="dli_08_15021__b106412873491934">Run Log</strong>, click <strong id="dli_08_15021__b131936468291934">OBS Bucket</strong>, and locate the folder of the log you want to view according to the date.</li><li id="dli_08_15021__li0641191914285">Go to the folder of the date, find the folder whose name contains <strong id="dli_08_15021__b94417702042755">taskmanager</strong>, download the <strong id="dli_08_15021__b88668913342755">.out</strong> file, and view result logs.<pre class="screen" id="dli_08_15021__screen11212991415">+I[202103241000000001, webShop, 2021-03-24 10:00:00, 100.0, 100.0, 2021-03-24 10:02:03, 0001, Alice, 330106]
+I[202103241606060001, appShop11, 2021-03-24 16:06:06, 200.0, 180.0, 2021-03-24 16:10:06, 0001, Alice, 330106]</pre>
</li></ol>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_08_15014.html">Formats</a></div>
</div>
</div>