Hi, need help with element masking. I need to know...
# gooddata-platform
k
Hi, need help with element masking. I need to know how I can masked metric information for a certain attribute. Ex. Store Name as the attribute and Sales as the metric. When I select Store 1 (ABC) - I should be able to see all the sales coming from the other stores but the store name is masked as "Other Stores". I was able to play with it, but my issue now is - sales are not visible (like null). It should be the other way around. Hope somebody can share their thoughts on this. Thanks!
j
Hi, element masking is fully supported only in Enterprise plan of our hosted platform currently. Did you follow instructions in documentation? https://help.gooddata.com/doc/enterprise/en/workspace-and-user-administration/managing-workspace-data-and-data-access/element-masking. You should use different metric for specification of condition when attribute value is visible or masked (e.g. “select 1 where Store Name=Store 1(ABC)” ) and different metric in report (Sales).
k
Thanks, Jakub. Yes, I followed the instruction - but when I tried testing it - I am getting the Metric masked not the Attribute. Also, would you know how to delete the element masking obj? I trying to do a HTTP DELETE Method but getting this error:
Copy code
{
  "error": {
    "component": "GDC::JSON",
    "errorClass": "GDC::Exception::User",
    "message": "malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before \"HTTP DELETE https://...\")",
    "parameters": [],
    "requestId": "AuRhRmwcFs5IXh2Q:0xzkp2anubug7a00"
  }
}
Hi Jakub - all good now. Was able to apply the element masking. I just need to delete the element masking object I created initially so I can set another one for that Attribute. Can you help me how? Thanks!
j
Hi, I suggest to list element masking objects first to obtain object id. You can open “grey page” with list of element masking objects using URL: https://yourdomain.on.gooddata.com/gdc/md/{project_id}/query/elementmaskings Follow the link of the masking object which has to be deleted and obtain its URL. The URL will be in form of https://yourdomain.on.gooddata.com/gdc/md/{project_id}/obj/{object_id}. HTTP DELETE request with this URL will delete the metadata object. Other option is to use manage2 resource and delete the object using identifier which can be found using query resource as described above. Open https://yourdomain.on.gooddata.com/gdc/md/{project_id}/ldm/manage2 “grey page” and submit following command:
Copy code
DROP {xyz}
where xyz is identifier of element masking object which can be found in the meta section of element masking object.
You may also try to edit the content of the masking object using
Copy code
<https://yourdomain.on.gooddata.com/gdc/md/{project_id}/obj/{elementMasking_object_id}?mode=edit>
k
Thanks for your help Jakub! I was able to apply the element masking in my project. I was doing it incorrectly the first time but was able to recreate it. 🙂
👍 1