я имел следующую ошибку, когда я попытался загрузить .csv.gz файл в виде таблицы из хранилища Google для BigQuery с помощью клиента Google Python Api:макс плохих записей в Google BigQuery
{u'state': u'DONE', u'errors': [{u'reason': u'invalid', u'message': u'Too many errors encountered. Limit is: {1}.'},
{u'reason': u'invalid', u'message': u'Too many values in row starting at position:64490 in file:/gzip/subrange/gs://my-bucket/myfile.csv.gz'}],
u'errorResult': {u'reason': u'invalid', u'message': u'Too many errors encountered. Limit is: {1}.'}}
Моя проблема заключается что я указал в запросе апите, что я хотел, чтобы 100 ошибок, используя параметр maxBadRecords следующим образом:
MAX_BAD_RECORDS = 100
body_query = {
'jobReference': {
'projectId': self.project_id,
'jobId': self._job_id
},
'configuration': {
'load': {
'destinationTable': {
'projectId': self.destination_table.project_id,
'datasetId': self.destination_table.dataset.id,
'tableId': self.destination_table.id,
},
'fieldDelimiter': self.delimiter,
'maxBadRecords': MAX_BAD_RECORDS,
'schema': {
'fields': self.schema
},
'sourceUris': self.source_uris,
'skipLeadingRows': self.skip_leading_rows_number,
'writeDisposition': self.write_disposition,
"createDisposition": self.create_disposition,
}
}
}
Я думаю, что Google BigQuery питон API имеет ошибку, и это не считает, что мое MAX_BAD_RECORDS установлено до 100.
Может кто-нибудь мне помочь?