UPDATE: This is the fix:
var request = BigQuery.newQueryRequest();
request.query = sql
// Inserts a Query Job
try {
queryResults = BigQuery.Jobs.query(request,projectNumber);
}
catch (err) {
Logger.log(err);
Browser.msgBox(err);
return;
}
My BigQuery > Google Spreadsheet has been working fine until now, that I'm getting the error 'Required parameter is missing'
The line of code that is throwing the exception is:
try {
queryResults = BigQuery.Jobs.query(projectNumber, sql, {'timeoutMs':10000});
}
The full code is in this tutorial.
https://developers.google.com/apps-script/articles/bigquery_tutorial#section2
Has this happened to anyone else? Have you find a solution to this?
Instead of this:
queryResults = BigQuery.Jobs.query(projectNumber, sql);
do this:
var bodyOrResource={
"kind": "bigquery#queryRequest",
"query": sql
}
queryResults = BigQuery.Jobs.query(bodyOrResource,projectNumber);
There was a breaking change introduced in the Google internal version of appscript that should not affect external customers yet. If you are accessing BigQuery from outside of Google you should not experience this issue (yet).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With