Menelaos Kotoglou
07/05/2023, 2:39 PMMenelaos Kotoglou
07/05/2023, 2:42 PM{
"data": {
"id": "<child-workspace-id>",
"type": "workspace",
"attributes": {
"description": "y",
"name": "z"
},
"relationships": {
"parent": {
"data": {
"id": "X",
"type": "workspace"
}
}
}
}
}
Menelaos Kotoglou
07/05/2023, 2:43 PManalyze
tab, I get the following error.
Error trace id: a29a3473e3664dcbMenelaos Kotoglou
07/05/2023, 2:44 PMMichael Ullock
07/05/2023, 3:03 PMmessage=Workspace data filter values for workspace='****' are empty and the current workspace='****' does not match the WDF workspace. This check is in place to prevent you from forgetting to filter values in a new child workspace. Either remove the workspace data filter or add some filtered values.
I will also send you a direct message where the mentioned workspace=â****â IDâs will be mentioned.Menelaos Kotoglou
07/05/2023, 3:07 PMMichal HauzĂrek
07/05/2023, 3:58 PMMenelaos Kotoglou
07/05/2023, 3:59 PM{
"workspaceDataFilters": [
{
"id": "shipco-id",
"title": "Shipco ID",
"columnName": "shipco_id",
"workspace": {
"id": "X",
"type": "workspace"
},
"workspaceDataFilterSettings": [
{
"id": "y",
"title": " shipco",
"filterValues": [
"***"
],
"workspace": {
"id": "***",
"type": "workspace"
}
}
]
}
]
}
Menelaos Kotoglou
07/05/2023, 4:07 PMMenelaos Kotoglou
07/05/2023, 6:40 PM{
"data": {
"id": "example",
"type": "workspace",
"attributes": {
"description": "Example workspace",
"name": "Example"
},
"relationships": {
"parent": {
"data": {
"id": "***",
"type": "workspace"
}
}
}
}
}
With the following request and I'm getting the error with id: d4388b2790b554a8
related to workspace data filters, but I haven't set up any filters for that workspace.Francisco Antunes
07/05/2023, 11:42 PMWorkspace data filter values for workspace='****' are empty and the current workspace='example' does not match the WDF workspace. This check is in place to prevent you from forgetting to filter values in a new child workspace. Either remove the workspace data filter or add some filtered values.
So it is expected to see it on a child workspace with no filters set up yet. đMichal HauzĂrek
07/09/2023, 12:24 PMMenelaos Kotoglou
07/09/2023, 10:32 PMMenelaos Kotoglou
07/09/2023, 10:32 PMMenelaos Kotoglou
07/10/2023, 1:02 PMMichal HauzĂrek
07/10/2023, 6:45 PMparent-master
.
1) First I create a WDF in the parent-master
workspace defined on top of a database column wdf_client_id
At this moment I can not define the values yet, since the child workspaces do not exist.
PUT /api/v1/layout/workspaceDataFilters
Authorization: Bearer $GD_API_TOKEN
Content-Type:application/json
{
"workspaceDataFilters": [
{
"id": "MY_WDF",
"title": "MY WDF Example",
"columnName": "wdf_client_id",
"workspace": {
"id": "parent-master",
"type": "workspace"
},
"workspaceDataFilterSettings": []
}
]
}
Now I can create first child workspace with ID child-albert
.
POST /api/v1/entities/workspaces
Authorization: Bearer $GD_API_TOKEN
Content-Type: application/vnd.gooddata.api+json
Accept: application/vnd.gooddata.api+json
{
"data": {
"id": "child-albert",
"type": "workspace",
"attributes": {
"description": "Albert child workspace.",
"name": "CHILD - Albert"
},
"relationships": {
"parent": {
"data": {
"id": "parent-master",
"type": "workspace"
}
}
}
}
}
Since it will be a child of a workspace with WDF defined and there is no value defined for it, it will now not display anything until I define its WDF value, to prevent any unwanted data leak.
To define the WDF value for it, I will call the WDF API again, this time I add the WDF value for child-albert
workspace. Note that I am repeating the previous call and just adding the new workspace to the workspaceDataFilterSettings
section. I want this workspace to only show data rows that have value âalbertâ in the wdf_client_id column:
PUT /api/v1/layout/workspaceDataFilters
Authorization: Bearer $GD_API_TOKEN
Content-Type:application/json
{
"workspaceDataFilters": [
{
"id": "MY_WDF",
"title": "MY WDF Example",
"columnName": "wdf_client_id",
"workspace": {
"id": "parent-master",
"type": "workspace"
},
"workspaceDataFilterSettings": [
{
"id": "my_wdf_albert",
"title": "my wdf Albert",
"filterValues": [
"albert"
],
"workspace": {
"id": "child-albert",
"type": "workspace"
}
}
]
}
]
}
After this the child-albert workspace should start showing data and it should be only those with the value âalbertâ in the âwdf_client_idâ column.
If I want to add another workspace with different WDF value, I just repeat those steps. First add a new child workspace (child-oscar
):
POST /api/v1/entities/workspaces
Authorization: Bearer $GD_API_TOKEN
Content-Type: application/vnd.gooddata.api+json
Accept: application/vnd.gooddata.api+json
{
"data": {
"id": "child-oscar",
"type": "workspace",
"attributes": {
"description": "Oscar child workspace.",
"name": "CHILD - Oscar"
},
"relationships": {
"parent": {
"data": {
"id": "parent-master",
"type": "workspace"
}
}
}
}
}
And then again define the WDF value for it. Again - we repeat the previous call (including WDF values for the existing workspaces) and just add the new workspace to the workspaceDataFilterSettings
section:
PUT /api/v1/layout/workspaceDataFilters
Authorization: Bearer $GD_API_TOKEN
Content-Type:application/json
{
"workspaceDataFilters": [
{
"id": "MY_WDF",
"title": "MY WDF Example",
"columnName": "wdf_client_id",
"workspace": {
"id": "parent-master",
"type": "workspace"
},
"workspaceDataFilterSettings": [
{
"id": "my_wdf_albert",
"title": "my wdf Albert",
"filterValues": [
"albert"
],
"workspace": {
"id": "child-albert",
"type": "workspace"
}
},
{
"id": "my_wdf_oscar",
"title": "my wdf Oscar",
"filterValues": [
"oscar"
],
"workspace": {
"id": "child-oscar",
"type": "workspace"
}
}
]
}
]
}
Note that creating a workspace is using entity API, that means you define a single workspace, while for the WDF you are using layout API where you provide the configuration for all workspaces.
I believe some entity version of the WDF API is being developed at the moment.
I hope this helps.Menelaos Kotoglou
07/11/2023, 1:43 PM