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.
var cc = DataStudioApp.createCommunityConnector(); var fieldType = cc.FieldType; var aggregationType = cc.AggregationType; var fields = cc.getFields(); fields.newMetric() .setAggregation(aggregationType.AVG) .setType(fieldType.CURRENCY_USD);
Properties
Property | Type | Description |
---|---|---|
AggregationType | AggregationType | The AggregationType enumeration. |
AuthType | AuthType | The AuthType enumeration. |
BigQueryParameterType | BigQueryParameterType | The BigQueryParameterType enumeration. |
FieldType | FieldType | The FieldType enumeration. |
Methods
Method | Return type | Brief description |
---|---|---|
getConfig() | Config | Returns a Config object. |
getFields() | Fields | Returns a Fields object. |
newAuthTypeResponse() | GetAuthTypeResponse | Returns a new GetAuthTypeResponse object. |
newBigQueryConfig() | BigQueryConfig | Returns a new BigQueryConfig object. |
newDebugError() | DebugError | Returns a new DebugError object. |
newGetDataResponse() | GetDataResponse | Returns a new GetDataResponse object. |
newGetSchemaResponse() | GetSchemaResponse | Returns a new GetSchemaResponse object. |
newSetCredentialsResponse() | SetCredentialsResponse | Returns a new SetCredentialsResponse object. |
newUserError() | UserError | Returns a new UserError object. |
Detailed documentation
getConfig()
getFields()
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.