Data Studio Community Connector for Bigquery - advanced-services

112 views
Skip to first unread message

sly felipa

unread,
Jun 29, 2021, 5:31:55 AM6/29/21
to Google Apps Script Community

Hello!

I am customizing an advanced service community connector. In this case to keep it simple I omit the parameters and do a query.

I follow the following example: Advanced Services de Data Studio

I checked the getData () method for better documentation: A JavaScript object representing the BigQuery query configuration.

I checked the Data Studio advanced service example repository for the most complete example: getData(request)

Manifest : "useQueryConfig": true

The code is as follows (a simple query):

var sqlString = ' SELECT name FROM `xxxx-101010.xxxx.xxxxxx` '; 

function getAuthType() { 

  var cc = DataStudioApp.createCommunityConnector(); 

  return cc.newAuthTypeResponse() .setAuthType(cc.AuthType.NONE) .build();

 } 

function getConfig(request) { 

  var cc = DataStudioApp.createCommunityConnector(); 

  var config = cc.getConfig(); return config.build(); 


function getFields(request) { 

  var cc = DataStudioApp.createCommunityConnector(); 

  var fields = cc.getFields(); var types = cc.FieldType; 

 fields.newDimension() .setId('newDimensionName') .setName('Package') .setType(types.TEXT); 

  return fields; 

function getSchema(request) { return {schema: getFields().build()}; }


function getData(request) { 

 var authToken = ScriptApp.getOAuthToken(); var bqConfig = DataStudioApp.createCommunityConnector().newBigQueryConfig() .setAccessToken(authToken) .setUseStandardSql(true) .setQuery(sqlString) .build(); return bqConfig 

}

The query I have tried with a table created by me (Permission: BigQuery data owner) and a public table (Permissions by default).

error_data_studio.png


Can someone help me with this? :)

shubham bhardwaj

unread,
Jul 11, 2022, 8:16:53 AM7/11/22
to Google Apps Script Community
Hi did you find a solution to your problem?

I'm also facing the same problem, could you please help me with it?
Reply all
Reply to author
Forward
0 new messages