CommunityConnector 可讓指令碼存取建構工具和公用程式,協助開發數據分析的社群連接器。使用這個類別取得 Fields 物件的參照,以及 FieldType 和 AggregationType 列舉,以便在建構 Field 時使用。
const cc = DataStudioApp.createCommunityConnector(); const fields = cc.getFields(); fields.newMetric() .setAggregation(cc.AggregationType.AVG) .setType(cc.FieldType.CURRENCY_USD);
屬性
| 屬性 | 類型 | 說明 |
|---|---|---|
Aggregation | Aggregation | Aggregation 列舉。 |
Auth | Auth | Auth 列舉。 |
Big | Big | Big 列舉。 |
Field | Field | Field 列舉。 |
方法
內容詳盡的說明文件
newAuthTypeResponse()
傳回新的 GetAuthTypeResponse 物件。您可以使用這個物件,為指令碼專案中實作的 getAuthType() 函式建立回應。
回攻員
newBigQueryConfig()
傳回新的 BigQueryConfig 物件。您可以使用這個物件,為指令碼專案中實作的 getData() 函式建立回應。
回攻員
BigQueryConfig:新的 BigQueryConfig 物件。
newDebugError()
newGetDataResponse()
傳回新的 GetDataResponse 物件。您可以使用這個物件,為指令碼專案中實作的 getData() 函式建立回應。
回攻員
GetDataResponse:新的 GetDataResponse 物件。
newGetSchemaResponse()
傳回新的 GetSchemaResponse 物件。您可以使用這個物件,為指令碼專案中實作的 getSchema() 函式建立回應。
回攻員
newSetCredentialsResponse()
傳回新的 SetCredentialsResponse 物件。使用這個物件,為您在指令碼專案中實作的 setCredentials() 函式建立回應。