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


##########
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)())

Review Comment:
   Hi, sorry for the late reply. Seems in some cases the type is a `beam.Row` 
which uses `.as_dict()` instead of `._asdict()` so have both to handle 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