def write(self, bucket, rows):
<EOL>BUFFER_SIZE = <NUM_LIT><EOL>schema = tableschema.Schema(self.describe(bucket))<EOL>fallbacks = self.__fallbacks.get(bucket, [])<EOL>rows_buffer = []<EOL>for row in rows:<EOL><INDENT>row = self.__mapper.convert_row(row, schema=schema, fallbacks=fallbacks)<EOL>rows_buffer.append(row)<EOL>if len(rows_buffer) > BUFFER_SIZE:<EOL><INDENT>self.__write_rows_buffer(bucket, rows_buffer)<EOL>rows_buffer = []<EOL><DEDENT><DEDENT>if len(rows_buffer) > <NUM_LIT:0>:<EOL><INDENT>self.__write_rows_buffer(bucket, rows_buffer)<EOL><DEDENT>
https://github.com/frictionlessdata/tableschema-bigquery-py#storage