CommunityConnector 可讓指令碼存取建構工具和公用程式,協助開發數據分析的社群連接器。使用此類別取得 Fields
物件以及 FieldType
和 AggregationType
列舉的參照,以便可用於 Field
的建構中。
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);
屬性
屬性 | 類型 | 說明 |
---|---|---|
AggregationType | AggregationType | AggregationType 列舉。 |
AuthType | AuthType | AuthType 列舉。 |
BigQueryParameterType | BigQueryParameterType | BigQueryParameterType 列舉。 |
FieldType | FieldType | FieldType 列舉。 |
方法
內容詳盡的說明文件
newAuthTypeResponse()
傳回新的 GetAuthTypeResponse
物件。請使用這個物件,為您在指令碼專案中實作的 getAuthType()
函式建立回應。
回攻員
newBigQueryConfig()
傳回新的 BigQueryConfig
物件。請使用這個物件,為您在指令碼專案中實作的 getData()
函式建立回應。
回攻員
BigQueryConfig
:新的 BigQueryConfig
物件。
newDebugError()
newGetDataResponse()
傳回新的 GetDataResponse
物件。請使用這個物件,為您在指令碼專案中實作的 getData()
函式建立回應。
回攻員
GetDataResponse
:新的 GetDataResponse
物件。
newGetSchemaResponse()
傳回新的 GetSchemaResponse
物件。請使用這個物件,為您在指令碼專案中實作的 getSchema()
函式建立回應。
回攻員
newSetCredentialsResponse()
傳回新的 SetCredentialsResponse
物件。請使用這個物件,為您在指令碼專案中實作的 setCredentials()
函式建立回應。