Updated on 2024-05-29 GMT+08:00

SHOW_LOG_FILE

This section applies only to MRS 3.3.0 or later.

Function

This command is used to view the meta and record information in log files.

Syntax

  • Viewing meta information:

    call show_logfile_metadata(table => '[table]', log_file_path_pattern => '[log_file_path_pattern]', limit => '[limit]')

  • Viewing record information:

    call show_logfile_records(table => '[table]', log_file_path_pattern => '[log_file_path_pattern]', merge => '[merge]', limit => '[limit]')

Parameter Description

Table 1 Parameters

Parameter

Description

Mandatory

table

Name of the table to be queried. The value can be in the database.tablename format.

Yes

log_file_path_pattern

Path of log files. Regular expression matching is supported.

No

merge

When the show_logfile_records command is executed, this parameter is used to control whether to combine records in multiple log files and return them together.

No

limit

Number of returned items

No

Example

call show_logfile_metadata(table => 'hudi_mor', log_file_path_pattern => 'http://hacluster/user/hive/warehouse/hudi_mor/dt=2021-08-28/.*?log.*?');
call show_logfile_records(table => 'hudi_mor', log_file_path_pattern => 'http://hacluster/user/hive/warehouse/hudi_mor/dt=2021-08-28/.*?log.*?', merge => false, limit => 1);

Precautions

  • This command is used only for MOR tables.

System Response

You can view query results on the client.