Class CommunityConnector

CommunityConnector

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);

プロパティ

プロパティ種類説明
AggregationTypeAggregationTypeAggregationType 列挙型。
AuthTypeAuthTypeAuthType 列挙型。
BigQueryParameterTypeBigQueryParameterTypeBigQueryParameterType 列挙型。
FieldTypeFieldTypeFieldType 列挙型。

Methods

メソッド戻り値の型概要
getConfig()ConfigConfig オブジェクトを返します。
getFields()FieldsFields オブジェクトを返します。
newAuthTypeResponse()GetAuthTypeResponse新しい GetAuthTypeResponse オブジェクトを返します。
newBigQueryConfig()BigQueryConfig新しい BigQueryConfig オブジェクトを返します。
newDebugError()DebugError新しい DebugError オブジェクトを返します。
newGetDataResponse()GetDataResponse新しい GetDataResponse オブジェクトを返します。
newGetSchemaResponse()GetSchemaResponse新しい GetSchemaResponse オブジェクトを返します。
newSetCredentialsResponse()SetCredentialsResponse新しい SetCredentialsResponse オブジェクトを返します。
newUserError()UserError新しい UserError オブジェクトを返します。

詳細なドキュメント

getConfig()

Config オブジェクトを返します。このオブジェクトを使用して、構成エントリを追加します。

リターン

Config - Config オブジェクト。


getFields()

Fields オブジェクトを返します。このオブジェクトを使用して、指標とディメンションの Field を追加します。

リターン

Fields - Fields オブジェクト。


newAuthTypeResponse()

新しい GetAuthTypeResponse オブジェクトを返します。このオブジェクトを使用して、スクリプト プロジェクトに実装する getAuthType() 関数に対するレスポンスを作成します。

リターン

GetAuthTypeResponse - 新しい GetAuthTypeResponse オブジェクト。


newBigQueryConfig()

新しい BigQueryConfig オブジェクトを返します。このオブジェクトを使用して、スクリプト プロジェクトに実装する getData() 関数に対するレスポンスを作成します。

リターン

BigQueryConfig - 新しい BigQueryConfig オブジェクト。


newDebugError()

新しい DebugError オブジェクトを返します。このオブジェクトを使用して、デバッグエラーを作成します。

リターン

DebugError - 新しい DebugError オブジェクト。


newGetDataResponse()

新しい GetDataResponse オブジェクトを返します。このオブジェクトを使用して、スクリプト プロジェクトに実装する getData() 関数に対するレスポンスを作成します。

リターン

GetDataResponse - 新しい GetDataResponse オブジェクト。


newGetSchemaResponse()

新しい GetSchemaResponse オブジェクトを返します。このオブジェクトを使用して、スクリプト プロジェクトに実装する getSchema() 関数に対するレスポンスを作成します。

リターン

GetSchemaResponse - 新しい GetSchemaResponse オブジェクト。


newSetCredentialsResponse()

新しい SetCredentialsResponse オブジェクトを返します。このオブジェクトを使用して、スクリプト プロジェクトに実装する setCredentials() 関数に対するレスポンスを作成します。

リターン

SetCredentialsResponse - 新しい SetCredentialsResponse オブジェクト。


newUserError()

新しい UserError オブジェクトを返します。このオブジェクトを使用して、ユーザーエラーを作成します。

リターン

UserError - 新しい UserError オブジェクト。