创建连接器:在setId中使用某些字符时出错

问题描述 投票:0回答:1

[当我在|, -中使用setID()等字符时,在调用getData()之前会发生此错误

抱歉,我们遇到错误,无法完成您的请求。

fields.newMetric()
.setId('xtras|avg_days')
.setName('avg_days')
.setType(types.NUMBER)
.setAggregation(aggregations.AVG)
google-data-studio
1个回答
0
投票

[Data Studio社区连接器字段ID仅允许使用字母数字字符和下划线。

Ref:https://developers.google.com/datastudio/connector/reference#field(在Legacy下检查。在Legacy中,Id被称为name,而name被称为label)。

© www.soinside.com 2019 - 2024. All rights reserved.