From e5149b571768ba76511076738091c9480efcff60 Mon Sep 17 00:00:00 2001 From: "E. Belfer" <37471869+e-belfer@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:35:42 -0400 Subject: [PATCH] Update src/pudl/metadata/classes.py Co-authored-by: Zane Selvans --- src/pudl/metadata/classes.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pudl/metadata/classes.py b/src/pudl/metadata/classes.py index abd048ecff..fd51458c45 100644 --- a/src/pudl/metadata/classes.py +++ b/src/pudl/metadata/classes.py @@ -1645,10 +1645,11 @@ def enforce_schema(self, df: pd.DataFrame) -> pd.DataFrame: # Log warning if columns in dataframe are getting dropped in write dropped_columns = list(df.columns.difference(expected_cols)) if dropped_columns: - logger.warning( - "The following columns are getting dropped when writing to SQLite:" - f"{dropped_columns}. To keep these columns, add them to the " - f"metadata.resources fields and update alembic." + logger.info( + "The following columns are getting dropped when the table is written:" + f"{dropped_columns}. This is often the intended behavior. If you want " + "to keep any of these columns, add them to the metadata.resources " + "fields and update alembic." ) df = self.format_df(df)