Gooddata Javascript API-不支持属性

Gooddata Javascript API - Attribute not supported

本文关键字:属性 不支持 API- Javascript Gooddata      更新时间:2023-09-26

调整d3数据即示例代码以适应项目,当下面几行的值更改为项目的标识符时,代码返回400(错误请求)

{
"error":
  {
    "errorClass":"com.gooddata.webapp.service.simpleexecutor.UnsupportedTypeException",
    "trace":"",
    "message":"Type attribute not supported in simple execution.",
    "component":"Webapp",
    "errorId":"51ab443c-b4a3-47be-a434-2cecfc4f244f",
    "errorCode":"gdc.webapp.execution.unsupported_type",
    "parameters":["attribute"]
  }
}

示例viz.js:中的代码

var metric = 'afSEwRwdbMeQ',
    attr1 = 'oppclose.aam81lMifn6q',
    attr2 = 'label.opp_owner.id.name';
var elements = [attr1, attr2, metric];

对于用于d3-data-viz示例的API执行,您必须提供属性标签度量的标识符,而不是特性。这就是错误所说的。

在您的示例中,我可以看到attr2是其标识符的属性标签(因为它以label开头)。因此,导致错误的元素是attr1metric

如何获得属性标签标识符在以下开发人员文章中进行了描述

https://developer.gooddata.com/article/acquiring-object-identifiers-for-project-metadata#AcquiringSpecialLDMIdentifiers