
# SHOW_COMMIT_FILES
#### 命令功能
查看指定的instant一共更新或者插入了多个文件。
#### 命令格式
**call show_commit_files(table=\>'\[table\]', instant_time=\>'\[instant_time\]', limit=\>\[limit\]);**
#### 参数描述
表1参数描述 
| **参数**       | **描述**                          | 是否必填 |
|:---|:---|:---|
| table        | 需要查询表的表名，支持database.tablename格式 | 是    |
| instant_time | 某次commit对应的时间戳                  | 是    |
| limit        | 限制返回结果的条数                       | 否    |
   
#### 示例
```
call show_commit_files(table=>'hudi_mor', instant_time=>'20230216144548249');
call show_commit_files(table=>'hudi_mor', instant_time=>'20230216144548249', limit=>1);
```
#### 返回结果
| **参数**                | **描述**                                                          |
|:---|:---|
| action                | instant_time对应的commit所属的action类型，如compaction、deltacommit、clean等 |
| partition_path        | 指定的instant所更新或插入的文件位于哪个分区                                       |
| file_id               | 指定的instant所更新或插入的文件的ID                                          |
| previous_commit       | 指定的instant所更新或插入的文件的文件名中的时间戳                                    |
| total_records_updated | 该文件中多少个record被更新                                                |
| total_records_written | 该文件中新插入了多少个record                                               |
| total_bytes_written   | 该文件新增多少bytes的数据                                                 |
| total_errors          | 指定的instant在更新或者插入过程中的报错                                         |
| file_size             | 该文件的大小（bytes）                                                   |
   
#### 权限需求
由DLI提供的元数据服务
- SQL权限：
  
  | **database** | **table** |
  |:---|:---|
  | 无            | SELECT    |
     
  
- 细粒度权限：dli:table:select
由LakeFormation提供的元数据服务，权限配置详见LakeFormation文档。
#### 系统响应
可以检查任务状态是否成功，查看任务结果，查看任务日志确认有无异常。
