BigQuery Functions Not Working

2019-08-05 16:01发布

问题:

The bigquery functions in our apps script had been working fine all along but 18/06/2013 onwards setProjectId(), setQuery() and other BigQuery functions have stopped working.

On using these functions, the variables remain undefined when they should ideally be populated.

A small sample script which reproduces this issue:

var newJobReference = BigQuery.newJobReference().setProjectId(yourProjectID);
var jobConfig = BigQuery.newJobConfiguration().setQuery(yourJobQueryConfiguration);

Anyone facing the same issue? What might be causing this?

回答1:

Issue is resolved when I use:

var newJobReference = BigQuery.newJobReference();
newJobReference.setProjectId(yourProjectID);

Instead of:

var newJobReference = BigQuery.newJobReference().setProjectId(yourProjectID);