I load data into google spreadsheets from our google bigquery database via google apps scripts. Until recently, I have managed to load over 3k rows of data... however it has now been limited to just 513 rows. When I run the same query in BigQuery, i'm able to get the actual 3000 rows of data.
My code:
function Job(){
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheetName = "RAW";
var sheet = ss.getSheetByName(sheetName);
ss.setActiveSheet(sheet);
var sql = ' BigQuery code';
var results = GSReport.runQueryAsync(sql);
var resultsValues = GSReport.parseBigQueryAPIResponse(results);
sheet.clear();
var data = [];
data.push([ "InstallWeek","Event","Users"]);
for ( var i = 0 ; i < resultsValues.length ; i++ ) {
data.push(resultsValues[i]);
}
var range = sheet.getRange(1,1,data.length,data[0].length); range.setValues(data);
}