COMPACTION
This topic is available for MRS 3.3.0 or later only.
Function
Compacts Hudi tables. For details, see Hudi Compaction.
Syntax
call run_compaction(op => '[op]', table=>'[table]', path=>'[path]', timestamp=>'[timestamp]');
Parameters
Parameter |
Description |
Mandatory |
---|---|---|
op |
Set this parameter to schedule to generate a compaction plan or to run to execute a generated compaction plan. |
Yes |
table |
Name of the table to be queried. The value can be in the database.tablename format. |
No |
path |
Path of the table to be queried |
No |
timestamp |
When op is set to run, you can specify timestamp to execute the compaction plan corresponding to the timestamp and the compaction plan that is not executed before the timestamp. |
No |
Example
call run_compaction(table => 'hudi_table1', op => 'schedule'); call run_compaction(table => 'hudi_table1', op => 'run'); call run_compaction(table => 'hudi_table1', op => 'run', timestamp => 'xxx'); call run_compaction(path => '/user/hive/warehouse/hudi_table1', op => 'run', timestamp => 'xxx');
Precautions
Only MOR tables can be compacted.
Response
You can view query results on the client.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot