Google Apps Script API
    Preparing search index...

    CommunityConnector enables scripts to access builders and utilities to help with development of Community Connectors for Data Studio. Use this class to get a reference to the Fields object and the FieldType and AggregationType enums so they can be used in the construction of Fields.

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

    Properties

    AggregationType: typeof AggregationType
    AuthType: typeof AuthType
    BigQueryParameterType: typeof BigQueryParameterType
    FieldType: typeof FieldType

    Methods