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 列挙型。 |
Methods
メソッド | 戻り値の型 | 概要 |
---|---|---|
getConfig() | Config | Config オブジェクトを返します。 |
getFields() | Fields | Fields オブジェクトを返します。 |
newAuthTypeResponse() | GetAuthTypeResponse | 新しい GetAuthTypeResponse オブジェクトを返します。 |
newBigQueryConfig() | BigQueryConfig | 新しい BigQueryConfig オブジェクトを返します。 |
newDebugError() | DebugError | 新しい DebugError オブジェクトを返します。 |
newGetDataResponse() | GetDataResponse | 新しい GetDataResponse オブジェクトを返します。 |
newGetSchemaResponse() | GetSchemaResponse | 新しい GetSchemaResponse オブジェクトを返します。 |
newSetCredentialsResponse() | SetCredentialsResponse | 新しい SetCredentialsResponse オブジェクトを返します。 |
newUserError() | UserError | 新しい UserError オブジェクトを返します。 |
詳細なドキュメント
newAuthTypeResponse()
新しい GetAuthTypeResponse
オブジェクトを返します。このオブジェクトを使用して、スクリプト プロジェクトに実装する getAuthType()
関数に対するレスポンスを作成します。
リターン
GetAuthTypeResponse
- 新しい GetAuthTypeResponse
オブジェクト。
newBigQueryConfig()
新しい BigQueryConfig
オブジェクトを返します。このオブジェクトを使用して、スクリプト プロジェクトに実装する getData()
関数に対するレスポンスを作成します。
リターン
BigQueryConfig
- 新しい BigQueryConfig
オブジェクト。
newDebugError()
newGetDataResponse()
新しい GetDataResponse
オブジェクトを返します。このオブジェクトを使用して、スクリプト プロジェクトに実装する getData()
関数に対するレスポンスを作成します。
リターン
GetDataResponse
- 新しい GetDataResponse
オブジェクト。
newGetSchemaResponse()
新しい GetSchemaResponse
オブジェクトを返します。このオブジェクトを使用して、スクリプト プロジェクトに実装する getSchema()
関数に対するレスポンスを作成します。
リターン
GetSchemaResponse
- 新しい GetSchemaResponse
オブジェクト。
newSetCredentialsResponse()
新しい SetCredentialsResponse
オブジェクトを返します。このオブジェクトを使用して、スクリプト プロジェクトに実装する setCredentials()
関数に対するレスポンスを作成します。
リターン
SetCredentialsResponse
- 新しい SetCredentialsResponse
オブジェクト。