From 69953c815298eba394e421dba42fdb5eaa07b205 Mon Sep 17 00:00:00 2001 From: Umar Farooq Ghumman <46414488+mail4umar@users.noreply.github.com> Date: Tue, 3 Dec 2024 07:06:58 -0600 Subject: [PATCH] Bugfix: QpeurProfiler Import - Exception for when missing values in tables. (#1340) Previously, if there was any empty table in the tar file, it would break the code. Now, it will try to create the table and print a warning if there was an issue. --- verticapy/performance/vertica/collection/profile_import.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/verticapy/performance/vertica/collection/profile_import.py b/verticapy/performance/vertica/collection/profile_import.py index 6f9b83b04..cc10513c2 100644 --- a/verticapy/performance/vertica/collection/profile_import.py +++ b/verticapy/performance/vertica/collection/profile_import.py @@ -352,4 +352,9 @@ def _load_vdataframes(self, unpack_dir: Path, version: BundleVersion) -> None: pd_dataframe["running_time"] = pd.to_timedelta( pd_dataframe["running_time"], unit="s" ) - ctable.copy_from_pandas_dataframe(pd_dataframe) + try: + ctable.copy_from_pandas_dataframe(pd_dataframe) + except Exception as e: + warning_message = f"Error loading the table {ctable.name}:" + print_message(warning_message + str(e), "warning") + self.logger.warning(warning_message + str(e))