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) .setFieldType(fieldType.CURRENCY_USD);
Properties
Property | Type | Description |
---|---|---|
AggregationType | AggregationType | The AggregationType enumeration. |
AuthType | AuthType | The AuthType 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 GetAuthTypeResponse object. |
newDebugError() | DebugError | Returns a DebugError object. |
newUserError() | UserError | Returns a UserError object. |
Detailed documentation
getConfig()
getFields()
newAuthTypeResponse()
Returns a GetAuthTypeResponse
object. Use this object to create a response for the
getAuthType()
function you implement in your script project.
Return
GetAuthTypeResponse
— A GetAuthTypeResponse
object.
newDebugError()
Returns a DebugError
object. Use this object to create debug errors.
Return
DebugError
— A DebugError
object.