amolsr commented on code in PR #31206:
URL: https://github.com/apache/airflow/pull/31206#discussion_r1191920099
##########
airflow/providers/amazon/aws/transfers/sql_to_s3.py:
##########
@@ -148,9 +148,13 @@ def _fix_dtypes(df: DataFrame, file_format: FILE_FORMAT)
-> None:
for col in df:
if df[col].dtype.name == "object" and file_format == "parquet":
- # if the type wasn't identified or converted, change it to a
string so if can still be
- # processed.
- df[col] = df[col].astype(str)
+ # if the type wasn't identified or converted, try parsing it
to datetime
+ try:
+ df[col] = pd.to_datetime(df[col])
Review Comment:
None values can be parsed to strings, but when encountered in the datetime
column, it will make the data invalid and not parseable in the following tasks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]