addenergyx commented on code in PR #35533:
URL: https://github.com/apache/beam/pull/35533#discussion_r2221748065


##########
sdks/python/apache_beam/io/gcp/bigquery.py:
##########
@@ -2723,11 +2723,12 @@ def expand(self, input):
         lambda row_and_error: row_and_error[0])
     if not is_rows:
       # return back from Beam Rows to Python dict elements
-      failed_rows = failed_rows | beam.Map(lambda row: row.as_dict())
+      failed_rows = failed_rows | beam.Map(
+          lambda row: getattr(row, 'as_dict', row._asdict)())
       failed_rows_with_errors = failed_rows_with_errors | beam.Map(
           lambda row: {
-              "error_message": row.error_message, "failed_row": row.failed_row.
-              as_dict()
+              "error_message": row.error_message, "failed_row": getattr(
+                  row, 'as_dict', row._asdict)()

Review Comment:
   ah my bad, thanks for catching that



-- 
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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to