From b3c519375a8fb595962e337169c363298f37b9b1 Mon Sep 17 00:00:00 2001
From: hhhhsc <1710496817@qq.com>
Date: Fri, 6 Mar 2026 15:54:43 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=95=8C=E9=9D=A2?=
=?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/i18n/locales/en/common.json | 2 +
frontend/src/i18n/locales/zh/common.json | 2 +
.../Detail/components/FileTable.tsx | 47 +++++++++++++++++++
3 files changed, 51 insertions(+)
diff --git a/frontend/src/i18n/locales/en/common.json b/frontend/src/i18n/locales/en/common.json
index 48be552c4..c21775a33 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 b62fad01e..95106ef7f 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 b3c1c1ed0..0b025645a 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",
From 3b888f3949783f4d57e431cd1a43437b90448bff Mon Sep 17 00:00:00 2001
From: hhhhsc <1710496817@qq.com>
Date: Fri, 6 Mar 2026 16:43:16 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E5=85=83=E6=95=B0=E6=8D=AE=E9=80=8F=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../module/cleaning/service/cleaning_task_service.py | 12 +++++++++++-
.../python-executor/datamate/wrappers/executor.py | 2 ++
2 files changed, 13 insertions(+), 1 deletion(-)
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 d8c02c41a..96ea61660 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 b44ef2a2f..4b40948f7 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"):