Class CommunityConnector

  • The CommunityConnector class provides builders and utilities for developing Community Connectors for Data Studio.

  • You can get references to Fields , FieldType , and AggregationType through the CommunityConnector object.

  • The CommunityConnector class has properties like AggregationType , AuthType , BigQueryParameterType , and FieldType .

  • Useful methods like getConfig() , getFields() , newGetDataResponse() , and newGetSchemaResponse() are available for connector development.

CommunityConnector

CommunityConnector enables scripts to access builders and utilities to help with development of Community Connectors for Data Studio. Use this class to get a reference to the Fields object and the FieldType and AggregationType enums so they can be used in the construction of Field s.

 const 
  
 cc 
  
 = 
  
 DataStudioApp 
 . 
 createCommunityConnector 
 (); 
 const 
  
 fields 
  
 = 
  
 cc 
 . 
 getFields 
 (); 
 fields 
 . 
 newMetric 
 () 
  
 . 
 setAggregation 
 ( 
 cc 
 . 
 AggregationType 
 . 
 AVG 
 ) 
  
 . 
 setType 
 ( 
 cc 
 . 
 FieldType 
 . 
 CURRENCY_USD 
 ); 

Properties

Property Type Description
Aggregation Type
Aggregation Type The Aggregation Type enumeration.
Auth Type
Auth Type The Auth Type enumeration.
Big Query Parameter Type
Big Query Parameter Type The Big Query Parameter Type enumeration.
Field Type
Field Type The Field Type enumeration.

Methods

Method Return type Brief description
Config Returns a Config object.
Fields Returns a Fields object.
Get Auth Type Response Returns a new Get Auth Type Response object.
Big Query Config Returns a new Big Query Config object.
Debug Error Returns a new Debug Error object.
Get Data Response Returns a new Get Data Response object.
Get Schema Response Returns a new Get Schema Response object.
Set Credentials Response Returns a new Set Credentials Response object.
User Error Returns a new User Error object.

Detailed documentation

getConfig()

Returns a Config object. Use this object to add configuration entries.

Return

Config — A Config object.


getFields()

Returns a Fields object. Use this object to add metric and dimension Field s.

Return

Fields — A Fields object.


newAuthTypeResponse()

Returns a new GetAuthTypeResponse object. Use this object to create a response for the getAuthType() function you implement in your script project.

Return

GetAuthTypeResponse — A new GetAuthTypeResponse object.


newBigQueryConfig()

Returns a new BigQueryConfig object. Use this object to create a response for the getData() function you implement in your script project.

Return

BigQueryConfig — A new BigQueryConfig object.


newDebugError()

Returns a new DebugError object. Use this object to create debug errors.

Return

DebugError — A new DebugError object.


newGetDataResponse()

Returns a new GetDataResponse object. Use this object to create a response for the getData() function you implement in your script project.

Return

GetDataResponse — A new GetDataResponse object.


newGetSchemaResponse()

Returns a new GetSchemaResponse object. Use this object to create a response for the getSchema() function you implement in your script project.

Return

GetSchemaResponse — A new GetSchemaResponse object.


newSetCredentialsResponse()

Returns a new SetCredentialsResponse object. Use this object to create a response for the setCredentials() function you implement in your script project.

Return

SetCredentialsResponse — A new SetCredentialsResponse object.


newUserError()

Returns a new UserError object. Use this object to create user errors.

Return

UserError — A new UserError object.

Create a Mobile Website
View Site in Mobile | Classic
Share by: