Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BigQuery Data.ErrorProto.Reason "stopped"

I'm inserting data with insertAll() but DataInsertAllRespone.InsertErrors returns the same error of each row I have inserted.

The errors only give me the field

**Data.ErrorProto.Reason** which contains: **"stopped"**.

This is the method that call insertAll():

public bool InsertAll(BigqueryService s, String datasetId, String tableId, List<TableDataInsertAllRequest.RowsData> data)
{
    TabledataResource t = s.Tabledata;
    TableDataInsertAllRequest req = new TableDataInsertAllRequest()
    {
        Kind = "bigquery#tableDataInsertAllRequest",
        Rows = data /*Posar aquí les files per pujar al BigQuery*/
    };
    TableDataInsertAllResponse response = t.InsertAll(req, projectId, datasetId, tableId).Execute();
    if (response.InsertErrors != null) return true;
    return false;
}

What happens? Why can't upload data?

*EDIT: * I realize that if i upload less than 6 rows works correctly, but the row size is about 1,6 Kb and the maximum row size is 20Kb.

Thanks, Roger

like image 357
RCalaf Avatar asked Jan 30 '14 15:01

RCalaf


1 Answers

Well, a few days ago I found the solution. When you streaming data into BigQuery using insertAll() method, you can stream multiple rows at once. If one of these rows is wrong Data.ErrorProto.Reason contains message for this error, for example, "Can't convert value to string." and the other rows contain "stopped" in Data.ErrorProto.Reason.

If you ever see this error, probably you have inconsistencies in the rows format

like image 200
RCalaf Avatar answered Sep 25 '22 17:09

RCalaf