2

プロジェクトに合わせて d3-data-viz サンプル コードを調整し、以下の行の値をプロジェクトの識別子に変更すると、コードは 400 (Bad Request) を返します。

{
"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];
4

1 に答える 1

2

d3-data-viz の例で使用される実行 API では、 attributes ではなく、 attribute labels または metrics のいずれかの識別子を指定する必要あります。それがエラーの内容です。

あなたの例では、それが識別子からの属性ラベルであることがわかりattr2ます(で始まるためlabel)。したがって、エラーの原因となっている要素は または のいずれattr1metricです。

属性ラベル識別子を取得する方法は、次の開発者記事で説明されています

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

于 2014-09-25T17:14:33.897 に答える