Skip to content

Commit 3b38e00

Browse files
committed
fix(data profile): downgrade the unsupported warning level
1 parent 2b147bd commit 3b38e00

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

alias/src/alias/agent/agents/data_source/data_profile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ async def data_profile(
9090
local_path = _copy_file_from_sandbox(sandbox, sandbox_path)
9191
elif source_type == SourceType.RELATIONAL_DB:
9292
local_path = sandbox_path
93+
else:
94+
raise ValueError(f"Unsupported source type: {source_type}")
9395

9496
dashscope_api_key = os.getenv("DASHSCOPE_API_KEY", "")
9597

alias/src/alias/agent/agents/data_source/data_source.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ async def _get_profile(self, sandbox) -> Optional[Dict[str, Any]]:
192192
"Profiling successfully: "
193193
+ f"{self._general_profile()[:100]}...",
194194
)
195+
except ValueError as e:
196+
self.profile = None
197+
logger.warning(f"Warning when profile data: {e}")
195198
except Exception as e:
196199
self.profile = None
197200
logger.error(f"Error when profile data: {e}")

0 commit comments

Comments
 (0)