Google Apps Script API
    Preparing search index...

    Contains field-related data. Its properties determine how the field is used in Data Studio.

    var cc = DataStudioApp.createCommunityConnector();
    var fields = cc.getFields();
    var types = cc.FieldType;
    
    var field1 = fields.newDimension()
      .setId('field1_id')
      .setName('Field 1 ID')
      .setDescription('The first field.')
      .setType(types.YEAR_MONTH)
      .setGroup('DATETIME');
    
    interface Field {
        getAggregation(): AggregationType;
        getDescription(): string;
        getFormula(): string;
        getGroup(): string;
        getId(): string;
        getIsReaggregatable(): boolean;
        getName(): string;
        getType(): FieldType;
        isDefault(): boolean;
        isDimension(): boolean;
        isHidden(): boolean;
        isMetric(): boolean;
        setAggregation(
            aggregation: AggregationType,
        ): GoogleAppsScript.Data_Studio.Field;
        setDescription(description: string): GoogleAppsScript.Data_Studio.Field;
        setFormula(formula: string): GoogleAppsScript.Data_Studio.Field;
        setGroup(group: string): GoogleAppsScript.Data_Studio.Field;
        setId(id: string): GoogleAppsScript.Data_Studio.Field;
        setIsHidden(isHidden: boolean): GoogleAppsScript.Data_Studio.Field;
        setIsReaggregatable(
            isReaggregatable: boolean,
        ): GoogleAppsScript.Data_Studio.Field;
        setName(name: string): GoogleAppsScript.Data_Studio.Field;
        setType(type: FieldType): GoogleAppsScript.Data_Studio.Field;
    }
    Index

    Methods