I am trying to insert a string using this sample code:
https://developers.google.com/bigquery/streaming-data-into-bigquery#streaminginsertexamples
TableRow row = new TableRow();
row.set("Col1", 50);
row.set("Col2", 50);
TableDataInsertAllRequest.Rows rows = new TableDataInsertAllRequest.Rows();
rows.setInsertId("" + System.currentTimeMillis());
rows.setJson(row);
List rowList = new ArrayList();
rowList.add(rows);
TableDataInsertAllRequest content = new TableDataInsertAllRequest().setRows(rowList);
try
{
TableDataInsertAllResponse response =
bigquery
.tabledata()
.insertAll("<myprojectid>", "6bc2cf53x8684x42a4x8149x9ff20fa8beed", "TestTable", content)
.execute();
System.out.println("Response: " + response);
}
catch (IOException e)
{
}
The scheme is as follows:
Col1 INTEGER NULLABLE
Col2 INTEGER NULLABLE
I get an error message:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 500
{
"code" : 500,
"errors" : [ {
"domain" : "global",
"message" : "Unexpected. Please try again.",
"reason" : "internalError"
} ],
"message" : "Unexpected. Please try again."
}
There is a project, there is a data set, there is a table, the data types correspond to the specification of the column, and I use the sample code. Jordan said on this subject [1] that 500 means a BigQuery error. I do not mind working on it (if so), but I have no idea how to do it. What can i try? I hardcoded simple values for each column, I tried a different table, I tried a different, completely new project / dataset / table set. The same result.
This is in both dev and GAE.
If this helps:
: 1066943214796 ( , , ), datasetid .
[1] HTTP 500 API Google