Hi, did someone had any success implementing <filt...
# troubleshoot
w
Hi, did someone had any success implementing filter inputs for creating policies? I’m trying to apply a “view entity” policy based on some criteria, e.g. entities with a certain tag attached or which are part of a specific cloud project. Not sure though if the filter functionality is already implemented yet. Trying to create it on GraphQL without any effect so far. Even doing an exact match with a URN does not work for me. Example:
Copy code
mutation createPolicy{
   createPolicy (
    input: {
    	type: METADATA,
       	name: "filter match urn",
       	state: ACTIVE,
       	description: "",
       	resources: {
       		type: "",
          	resources: [  ],
          	allResources: false,
        	  filter: {
                criteria: [
                  {
                    field: "entity_urn",
                    values: [ "urn:li:dataset:(urn:li:dataPlatform:bigquery,<project>.<dataset>.<table>,DEV)" ],
                    condition: EQUALS
                  }
                ]
              }
       },
       actors: {
       		users: [ ],
          groups: [ ],
          resourceOwners: false,
          allUsers: true,
          allGroups: false
       },
       privileges:[ "VIEW_ENTITY_PAGE" ]
    }
  )
}
Any help greatly appreciated 🙂 Cheers
b
You're policy looks good to me!
And you're seeing that all users cannot view that asset?
or can?
w
Cannot. Matching the exact URN of a dataset entity seems not to grant the view privilege. And while looking at the created policy on the UI, the defined filter isn’t shown (running DataHub on Chart v0.2.85):