Metadata Extraction Policies
A policy defines a set of actions performed when a class of entities is extracted. The following actions are supported:
- Adding business metadata such as tags and properties.
- Sending a message to a JMS message queue. The JSON format message contains the metadata of the entity to which the policy applies and the message text specified in the policy:
{"entity":entity_properties, "userMessage":"some message text"}
Continue reading:
Viewing Policies
- Start and log into the Navigator UI.
- Click the Policies tab.
- In the left pane, click a policy.
Creating Policies
- Start and log into the Navigator UI.
- Depending on the starting point, do one of the following:
Action Procedure Policies page - Click the Policies tab.
- Click Create a New Policy.
Search results page - In the Search results page, click Create a policy.
- Enter a name for the policy.
- Check the Enable Policy checkbox.
- Specify the search query that defines the class of entities to which the policy applies. If you arrive at the Policies page by clicking a search result, the query property is populated with the query that generated the result. To display a list of entities that satisfy a search query, click the Search Results link.
- Specify an optional description for the policy.
- If policy expressions are enabled and you choose to use policy expressions in properties that support expressions, specify required imports in the Import Statements field. For example, if your policy expression uses policy enums, for example: entity.get(FSEntityProperties.ORIGINAL_NAME, Object.class) your import would be: import com.cloudera.nav.hdfs.model.FSEntityProperties. If your expression uses another library, such as Date, add the required import for that library.
- Choose the schedule for applying the policy: On Data Change, Immediate, Once, or Recurring.
- Check the checkboxes next to the desired actions and follow the appropriate procedure:
Action Procedure Assign Metadata - Specify the custom metadata. Optionally check the Expression checkbox and specify a policy expression for the indicated fields.
Send Notification to JMS - If not already configured, configure a JMS server and queue.
- Specify the queue name and message. Optionally check the Expression checkbox and specify a policy expression for the message.
- Click Save.
Cloning and Editing a Policy
- Start and log into the Navigator UI.
- Click the Policies tab.
- In the left pane, click a policy.
- Click Clone Policy or Edit Policy.
- Edit the policy name, search query, or policy actions.
- Click Save.
Deleting Policies
- Start and log into the Navigator UI.
- Click the Policies tab.
- In the left pane, click a policy.
- Click Delete and click OK to confirm.