I am using BigQuery Connector in WSO2 to insert multiple records in BigQuery cloud.
I followed this link and was able to insert a single record successfully.
First I tried to pass multiple records by separating them using a comma.
However, in this case, only the first record gets inserted and other records are skipped.
Please note that no error is returned in this case.
My Json message with multiple records:
{"insertId":"101","json":{"NAME":"Vishal_101","ADDRESS":"UK","ID":"vbordia"}},{"insertId":"102","json":{"NAME":"Vishal_102","ADDRESS":"UK","ID":"vbordia"}}
Second I tried this link which explain how to build multiple records.
However, this time I get an invalid response from BigQuery. Since the response message is not well explanatory I am unable to understand the cause.-
Messagean :
{
"rows":
[
{
"insertId":"209",
"json":
{
"NAME": "NewRow1",
"ADDRESS": "NewAddr",
"ID": "123"
}
},
{
"insertId":"210",
"json":
{
"NAME": "NewRow2",
"ADDRESS": "NewAddr",
"ID": "123"
}
}
]
}
Error Message Returned from BigQuery :
{
"insertErrors": [
{
"index": 0,
"errors": [
{
"reason": "invalid",
"location": "",
"debugInfo": "",
"message": ""
}
]
}
]
}
Can anyone please help me here.What is the correct way of inserting multiple records in BigQuery via Wso2. Thanks in advance.