Files
doc-exports/docs/dli/sqlreference/dli_08_15051.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

22 lines
3.7 KiB
HTML

<a name="dli_08_15051"></a><a name="dli_08_15051"></a>
<h1 class="topictitle1">Hive Dimension Table</h1>
<div id="body0000001760200353"><div class="section" id="dli_08_15051__section17209510185415"><h4 class="sectiontitle">Function</h4><p id="dli_08_15051__p104601217145416">You can use Hive tables as temporal tables and associate them through temporal joins. For more information on temporal joins, refer to <a href="https://nightlies.apache.org/flink/flink-docs-release-1.15/zh/docs/dev/table/sql/queries/joins/#temporal-joins" target="_blank" rel="noopener noreferrer">temporal join</a>.</p>
<p id="dli_08_15051__p1397716103617">Flink supports processing-time temporal joins with Hive tables, which always join the latest version of the temporal table. Flink supports temporary joins with both partitioned and non-partitioned Hive tables. For partitioned tables, Flink automatically tracks the latest partition of the Hive table. For details, see <a href="https://nightlies.apache.org/flink/flink-docs-release-1.15/zh/docs/connectors/table/hive/hive_read_write/" target="_blank" rel="noopener noreferrer">Apache Flink Hive Read &amp; Write</a>.</p>
</div>
<div class="section" id="dli_08_15051__section2093155184317"><h4 class="sectiontitle">Caveats</h4><ul id="dli_08_15051__ul153481123142319"><li id="dli_08_15051__li7348132312239">Currently, Flink does not support event-time temporal joins with Hive tables.</li><li id="dli_08_15051__li1067424112315">The "Temporal Join The Latest Partition" feature is only supported in Flink STREAMING mode.</li></ul>
<ul id="dli_08_15051__ul181711754173415"><li id="dli_08_15051__li6647155118407">When you create a Flink OpenSource SQL job, set <strong id="dli_08_15051__b178101049622541">Flink Version</strong> to <strong id="dli_08_15051__b1325804022541">1.15</strong> in the <strong id="dli_08_15051__b103668513622541">Running Parameters</strong> tab. Select <strong id="dli_08_15051__b183161140422541">Save Job Log</strong>, and specify the OBS bucket for saving job logs.</li><li id="dli_08_15051__li118441048194615">For details about how to use data types, see <a href="dli_08_15014.html">Format</a>.</li><li id="dli_08_15051__li1877614152149">Flink 1.15 currently only supports creating OBS tables and DLI lakehouse tables using Hive syntax, which is supported by Hive dialect DDL statements.<ul id="dli_08_15051__ul52301539191612"><li id="dli_08_15051__li10367153891614">To create an OBS table using Hive syntax:<ul id="dli_08_15051__ul1176113556160"><li id="dli_08_15051__li11290555171618">For the default dialect, set <strong id="dli_08_15051__b23713553186">hive.is-external</strong> to <strong id="dli_08_15051__b1237175514180">true</strong> in the with properties.</li><li id="dli_08_15051__li147011552191818">For the Hive dialect, use the <strong id="dli_08_15051__b1996965612184">EXTERNAL</strong> keyword in the create table statement.</li></ul>
</li><li id="dli_08_15051__li1083810474167">To create a DLI lakehouse table using Hive syntax:<ul id="dli_08_15051__ul1010114179193"><li id="dli_08_15051__li15304829161914">For the Hive dialect, add <strong id="dli_08_15051__b8869859101811">'is_lakehouse'='true'</strong> to the table properties.</li></ul>
</li></ul>
</li><li id="dli_08_15051__li157241324185312">When creating a Flink OpenSource SQL job, enable checkpointing in the job editing interface.</li></ul>
</div>
<div class="section" id="dli_08_15051__dli_08_0261_section1691193353316"><h4 class="sectiontitle">Syntax Format and Parameter Description</h4><p id="dli_08_15051__p13659205925114">For details, see the syntax format and parameter description in <a href="dli_08_15049.html">Hive Source Table</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_08_15046.html">Hive</a></div>
</div>
</div>