File tree 1 file changed +4
-5
lines changed
sdks/python/apache_beam/yaml
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -77,8 +77,8 @@ def write_to_text(pcoll, path: str):
77
77
"""
78
78
try :
79
79
field_names = [
80
- name for name , _ in schemas . named_fields_from_element_type (
81
- pcoll .element_type )
80
+ name for name ,
81
+ _ in schemas . named_fields_from_element_type ( pcoll .element_type )
82
82
]
83
83
except Exception as exn :
84
84
raise ValueError (
@@ -167,9 +167,7 @@ def write_to_bigquery(
167
167
described at https://beam.apache.org/documentation/sdks/yaml-errors/
168
168
Otherwise permanently failing records will cause pipeline failure.
169
169
"""
170
-
171
170
class WriteToBigQueryHandlingErrors (beam .PTransform ):
172
-
173
171
def default_label (self ):
174
172
return 'WriteToBigQuery'
175
173
@@ -238,7 +236,8 @@ def _validate_schema():
238
236
beam_schema = avroio .avro_schema_to_beam_schema (schema )
239
237
covert_to_row = avroio .avro_dict_to_beam_row (schema , beam_schema )
240
238
return (
241
- beam_schema , lambda record : covert_to_row (
239
+ beam_schema ,
240
+ lambda record : covert_to_row (
242
241
fastavro .schemaless_reader (
243
242
fo = io .BytesIO (record ), writer_schema = schema )))
244
243
else :
You can’t perform that action at this time.
0 commit comments