Reputation: 11
When I use some characters like |, -
etc. in setID()
this error happens before calling getData()
Sorry, we encountered an error and were unable to complete your request.
fields.newMetric()
.setId('xtras|avg_days')
.setName('avg_days')
.setType(types.NUMBER)
.setAggregation(aggregations.AVG)
Upvotes: 1
Views: 79
Reputation: 3168
Only alphanumeric characters and underscores are allowed for Data Studio Community Connector field Ids.
Ref: https://developers.google.com/datastudio/connector/reference#field (check under Legacy. In Legacy, Id
s are called name
s and name
s are called label
s).
Upvotes: 1