diff --git a/src/mes_dashboard/services/excel_query_service.py b/src/mes_dashboard/services/excel_query_service.py index c68cd75..9784b09 100644 --- a/src/mes_dashboard/services/excel_query_service.py +++ b/src/mes_dashboard/services/excel_query_service.py @@ -9,9 +9,9 @@ import re from datetime import datetime from typing import Any, Dict, List, Tuple -import pandas as pd - -from mes_dashboard.core.database import get_db_connection +import pandas as pd + +from mes_dashboard.core.database import get_db_connection # Oracle IN clause limit @@ -77,8 +77,8 @@ def sanitize_column_name(name: str) -> str: def validate_table_name(table_name: str) -> bool: - """Validate table name format.""" - return bool(re.match(r'^[A-Za-z_][A-Za-z0-9_]*$', table_name)) + """Validate table name format (supports schema.table format).""" + return bool(re.match(r'^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)?$', table_name)) def execute_batch_query(