Class CommunityConnector

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

  • You can get references toFields,FieldType, andAggregationType through theCommunityConnector object.

  • TheCommunityConnector class has properties likeAggregationType,AuthType,BigQueryParameterType, andFieldType.

  • Useful methods likegetConfig(),getFields(),newGetDataResponse(), andnewGetSchemaResponse() are available for connector development.

CommunityConnector

CommunityConnector enables scripts to access builders and utilities to help with development ofCommunity Connectors for Data Studio. Use this class to get a reference to theFieldsobject and theFieldType andAggregationType enums so they can be used in theconstruction ofFields.

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

Properties

PropertyTypeDescription
AggregationTypeAggregationTypeTheAggregationType enumeration.
AuthTypeAuthTypeTheAuthType enumeration.
BigQueryParameterTypeBigQueryParameterTypeTheBigQueryParameterType enumeration.
FieldTypeFieldTypeTheFieldType enumeration.

Methods

MethodReturn typeBrief description
getConfig()ConfigReturns aConfig object.
getFields()FieldsReturns aFields object.
newAuthTypeResponse()GetAuthTypeResponseReturns a newGetAuthTypeResponse object.
newBigQueryConfig()BigQueryConfigReturns a newBigQueryConfig object.
newDebugError()DebugErrorReturns a newDebugError object.
newGetDataResponse()GetDataResponseReturns a newGetDataResponse object.
newGetSchemaResponse()GetSchemaResponseReturns a newGetSchemaResponse object.
newSetCredentialsResponse()SetCredentialsResponseReturns a newSetCredentialsResponse object.
newUserError()UserErrorReturns a newUserError object.

Detailed documentation

getConfig()

Returns aConfig object. Use this object to add configuration entries.

Return

Config — AConfig object.


getFields()

Returns aFields object. Use this object to add metric and dimensionFields.

Return

Fields — AFields object.


newAuthTypeResponse()

Returns a newGetAuthTypeResponse object. Use this object to create a response for thegetAuthType() function you implement in your script project.

Return

GetAuthTypeResponse — A newGetAuthTypeResponse object.


newBigQueryConfig()

Returns a newBigQueryConfig object. Use this object to create a response for thegetData() function you implement in your script project.

Return

BigQueryConfig — A newBigQueryConfig object.


newDebugError()

Returns a newDebugError object. Use this object to create debug errors.

Return

DebugError — A newDebugError object.


newGetDataResponse()

Returns a newGetDataResponse object. Use this object to create a response for thegetData() function you implement in your script project.

Return

GetDataResponse — A newGetDataResponse object.


newGetSchemaResponse()

Returns a newGetSchemaResponse object. Use this object to create a response for thegetSchema() function you implement in your script project.

Return

GetSchemaResponse — A newGetSchemaResponse object.


newSetCredentialsResponse()

Returns a newSetCredentialsResponse object. Use this object to create a response forthesetCredentials() function you implement in your script project.

Return

SetCredentialsResponse — A newSetCredentialsResponse object.


newUserError()

Returns a newUserError object. Use this object to create user errors.

Return

UserError — A newUserError object.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-12-02 UTC.