I make query to Google BigQuery, and it works in console, but fail when I try the same in google app script here is the code:
in console runs normal:
SELECT title FROM [bigquery-public-data:samples.wikipedia] where title contains 'olimpic' LIMIT 100
in app script it runs with error:
Encountered " "-" "- "" at line 1, column 27. Was expecting: EOF
function runQuery() {
var projectId = 'cool-reality-177704';
var request = {
query: 'SELECT title FROM bigquery-public-data:samples.wikipedia where title contains "olimpic" LIMIT 100'
};
var queryResults = BigQuery.Jobs.query(request, projectId);
var jobId = queryResults.jobReference.jobId;
Logger.log(queryResults)
}
What I do wrong?