2

Adjusting the d3-data-viz example code to fit a project and when the values of the below lines are changed to identifiers from the project, the code returns a 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"]
  }
}

Code from example viz.js:

var metric = 'afSEwRwdbMeQ',
    attr1 = 'oppclose.aam81lMifn6q',
    attr2 = 'label.opp_owner.id.name';
var elements = [attr1, attr2, metric];
Tom Smith
  • 21
  • 1
  • Have you changed anything in the example? The part where you define elements looks same and it is working for me... – Jiri Tobolka Sep 25 '14 at 16:55

1 Answers1

2

For the execution API used for d3-data-viz example you have to provide identifiers of either attribute labels or metrics, not attributes. Thats what the error says.

In your example, I can see that attr2 is attribute label from its identifier (because it starts with label). So the element causing the error is either attr1 or metric.

How to get attribute label identifier is described in following developer article

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

Jan Vlcek
  • 85
  • 7
  • Weird is that this example runs against demo Project and so identifiers should be the same...I have same identifiers and works for me. – Jiri Tobolka Sep 25 '14 at 21:49
  • @JiriTobolka You are right, if I try calling the execution API using demo project with the identifiers Tom posted, I get result successfully. The error message is clear though. Maybe Tom used different project? – Jan Vlcek Sep 28 '14 at 19:54