diff --git a/frontend/src/i18n/locales/en/common.json b/frontend/src/i18n/locales/en/common.json
index 48be552c..c21775a3 100644
--- a/frontend/src/i18n/locales/en/common.json
+++ b/frontend/src/i18n/locales/en/common.json
@@ -1432,6 +1432,8 @@
"processedFileType": "Processed File Type",
"beforeSize": "Before Size",
"afterSize": "After Size",
+ "result": "Result",
+ "resultDetail": "Result Detail",
"status": "Status",
"actions": "Actions",
"searchFileName": "Search file name",
diff --git a/frontend/src/i18n/locales/zh/common.json b/frontend/src/i18n/locales/zh/common.json
index b62fad01..95106ef7 100644
--- a/frontend/src/i18n/locales/zh/common.json
+++ b/frontend/src/i18n/locales/zh/common.json
@@ -1432,6 +1432,8 @@
"processedFileType": "处理后文件类型",
"beforeSize": "处理前大小",
"afterSize": "处理后大小",
+ "result": "处理结果",
+ "resultDetail": "处理结果详情",
"status": "状态",
"actions": "操作",
"searchFileName": "搜索文件名",
diff --git a/frontend/src/pages/DataCleansing/Detail/components/FileTable.tsx b/frontend/src/pages/DataCleansing/Detail/components/FileTable.tsx
index b3c1c1ed..0b025645 100644
--- a/frontend/src/pages/DataCleansing/Detail/components/FileTable.tsx
+++ b/frontend/src/pages/DataCleansing/Detail/components/FileTable.tsx
@@ -262,6 +262,53 @@ export default function FileTable({result, fetchTaskResult}) {
{formatFileSize(number)}
),
},
+ {
+ title: t("dataCleansing.detail.fileTable.result"),
+ dataIndex: "result",
+ key: "result",
+ width: 200,
+ render: (text: string) => {
+ if (!text) return -;
+
+ try {
+ const parsed = JSON.parse(text);
+ const jsonString = JSON.stringify(parsed, null, 2);
+ const displayText = typeof parsed === 'object'
+ ? (Array.isArray(parsed) ? `[${parsed.length} items]` : '{...}')
+ : String(parsed);
+
+ return (
+
+ {jsonString}
+
+ }
+ title={t("dataCleansing.detail.fileTable.resultDetail")}
+ trigger="click"
+ >
+
+ {displayText}
+
+
+ );
+ } catch {
+ const displayText = text.length > 30 ? text.substring(0, 30) + '...' : text;
+ return (
+ {text}}
+ title={t("dataCleansing.detail.fileTable.resultDetail")}
+ trigger="click"
+ disabled={text.length <= 30}
+ >
+
+ {displayText}
+
+
+ );
+ }
+ },
+ },
{
title: t("dataCleansing.detail.fileTable.status"),
dataIndex: "status",
diff --git a/runtime/datamate-python/app/module/cleaning/service/cleaning_task_service.py b/runtime/datamate-python/app/module/cleaning/service/cleaning_task_service.py
index d8c02c41..96ea6166 100644
--- a/runtime/datamate-python/app/module/cleaning/service/cleaning_task_service.py
+++ b/runtime/datamate-python/app/module/cleaning/service/cleaning_task_service.py
@@ -326,7 +326,7 @@ async def scan_dataset(
target_file_path.parent.mkdir(parents=True, exist_ok=True)
query = text("""
- SELECT id, file_name, file_path, file_type, file_size
+ SELECT id, file_name, file_path, file_type, file_size, metadata
FROM t_dm_dataset_files
WHERE dataset_id = :dataset_id
ORDER BY created_at
@@ -340,12 +340,22 @@ async def scan_dataset(
if succeed_files and file.id in succeed_files:
continue
+ metadata_dict = {}
+ if file.metadata:
+ try:
+ parsed = json.loads(file.metadata)
+ if isinstance(parsed, dict):
+ metadata_dict = parsed
+ except (json.JSONDecodeError, TypeError):
+ pass
+
file_info = {
"fileId": file.id,
"fileName": file.file_name,
"filePath": file.file_path,
"fileType": file.file_type,
"fileSize": file.file_size,
+ "metadata": metadata_dict,
}
f.write(json.dumps(file_info, ensure_ascii=False) + "\n")
diff --git a/runtime/python-executor/datamate/wrappers/executor.py b/runtime/python-executor/datamate/wrappers/executor.py
index b44ef2a2..4b40948f 100644
--- a/runtime/python-executor/datamate/wrappers/executor.py
+++ b/runtime/python-executor/datamate/wrappers/executor.py
@@ -43,6 +43,8 @@ def load_meta(self, line):
meta["sourceFileType"] = meta.get("fileType")
if meta.get("fileSize"):
meta["sourceFileSize"] = meta.get("fileSize")
+ else:
+ meta["sourceFileSize"] = 0
if not meta.get("totalPageNum"):
meta["totalPageNum"] = 0
if not meta.get("extraFilePath"):