Yang, Tong 3f5759eed2 MRS comp-lts 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>
2023-01-19 17:08:45 +00:00

14 lines
3.3 KiB
HTML

<a name="mrs_01_24262"></a><a name="mrs_01_24262"></a>
<h1 class="topictitle1">Constraints</h1>
<div id="body8662426"><p id="mrs_01_24262__en-us_topic_0000001219149103_p16440183782412">Hudi 0.9.0 adds Spark SQL DDL and DML statements for using Hudi, making it easier for all users (including non-engineers or analysts) to access and operate Hudi.</p>
<div class="section" id="mrs_01_24262__en-us_topic_0000001219149103_section182382521241"><h4 class="sectiontitle">Constraints</h4><ul id="mrs_01_24262__en-us_topic_0000001219149103_ul1155358142413"><li id="mrs_01_24262__en-us_topic_0000001219149103_li1115525814246">You can use Spark SQL to operate Hudi on the Hudi client.</li><li id="mrs_01_24262__en-us_topic_0000001219149103_li815595818247">You can use Spark SQL to operate Hudi in JDBCServer of Spark2x.</li><li id="mrs_01_24262__en-us_topic_0000001219149103_li18156558182413">You cannot use Spark SQL to operate Hudi on the Spark2x client.</li><li id="mrs_01_24262__en-us_topic_0000001219149103_li1515665842415">You cannot operate Hudi in the Hive or Hetu engine.</li><li id="mrs_01_24262__en-us_topic_0000001219149103_li915613583245">The default value of <strong id="mrs_01_24262__en-us_topic_0000001219149103_b153851063010">KeyGenerator</strong> in SQL is <strong id="mrs_01_24262__en-us_topic_0000001219149103_b12501345193019">org.apache.hudi.keygen.ComplexKeyGenerator</strong>. Therefore, you need to set the <strong id="mrs_01_24262__en-us_topic_0000001219149103_b19414165563617">KeyGenerator</strong> value to that of SQL when data is written in DataSource mode.</li><li id="mrs_01_24262__en-us_topic_0000001219149103_li61566587248">If you run the <strong id="mrs_01_24262__en-us_topic_0000001219149103_b7672184624518">Show Partitions</strong> command for the first time, you need to run the <strong id="mrs_01_24262__en-us_topic_0000001219149103_b18616185734512">msck repair</strong> command as prompted.</li><li id="mrs_01_24262__en-us_topic_0000001219149103_li815611588247">Spark SQL does not support incremental view query.</li><li id="mrs_01_24262__en-us_topic_0000001219149103_li11915104125217">Spark SQL does not support ALTER CHANGE DATA TYPE.</li><li id="mrs_01_24262__en-us_topic_0000001219149103_li117663314398">To write data incrementally using SQL into a COW table created using DataSource, you need to run the <strong id="mrs_01_24262__en-us_topic_0000001219149103_b672921017272">ALTER TABLE</strong> <em id="mrs_01_24262__en-us_topic_0000001219149103_i436011377269">table_name</em> <strong id="mrs_01_24262__en-us_topic_0000001219149103_b478011283275">SET SERDEPROPERTIES(primaryKey='</strong><em id="mrs_01_24262__en-us_topic_0000001219149103_i1778315284277">xx</em><strong id="mrs_01_24262__en-us_topic_0000001219149103_b174032329277">',preCombineField='</strong><em id="mrs_01_24262__en-us_topic_0000001219149103_i14406632162716">xx</em><strong id="mrs_01_24262__en-us_topic_0000001219149103_b14404532142713">')</strong> statement in SQL to reset two properties of the table. To write data incrementally using SQL into an MOR table created using DataSource, you need to specify a path to the one set for creating this MOR table.</li></ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24261.html">Hudi SQL Syntax Reference</a></div>
</div>
</div>