Skip to content

Commit

Permalink
Merge branch '861-2023-fr' of https://github.com/catalyst-cooperative…
Browse files Browse the repository at this point in the history
…/pudl into 861-2023-fr
  • Loading branch information
e-belfer committed Oct 18, 2024
2 parents aaeccf7 + e5149b5 commit b6db0ef
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pudl/metadata/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b6db0ef

Please sign in to comment.