Updated on 2025-02-22 GMT+08:00

SHOW_LOG_FILE

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 Parameter descriptions

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 show_logfile_records is executed, this parameter is used to specify 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 => 'obs://bucket/path/hudi_mor/dt=2021-08-28/.*?log.*?');
call show_logfile_records(table => 'hudi_mor', log_file_path_pattern => 'obs://bucket/path/hudi_mor/dt=2021-08-28/.*?log.*?', merge => false, limit => 1);

Caveats

  • This command is used only for MOR tables.

Permission Requirements

Metadata service provided by DLI

  • SQL permissions:

    database

    table

    None

    SELECT

  • Fine-grained permission: dli:table:select

Metadata services provided by LakeFormation. Refer to the LakeFormation documentation for details on permission configuration.

System Response

You can check if the job status is successful, view the job result, and review the job logs to confirm if there are any exceptions.