> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pdc-10.2-data-optimizer/pdso-management/pdso-use-rules/pdc-metadata-rules/pdc-creating-a-metadata-rule.md).

# Creating a metadata rule

You create metadata rules to execute rule definitions on a selected data source.

Perform the following steps to create a new metadata rule.

**Note:** If you create a rule with a rule definition that contains a Delete operation, you get a message that since a Delete operation is configured, all other configured operations will be ignored.

1. Click **Management** in the left navigation menu.

   The Manage Your Environment page opens.
2. On the **Metadata Rules** card, click **Add New**, and then select **Add Rule** from the menu.

   The Add Rule page opens.
3. Enter the **Rule Name**.
4. In **Select Rule Definition**, select the rule definition if you have already created it, or click **Create Rule Definition** to create a rule definition. See [Creating a rule definition](/pdc-10.2-data-optimizer/pdso-management/pdso-use-rules/pdc-rule-definitions/pdc-creating-a-rule-definition.md) for more information.
5. Select one or more **Source Data Assets** and click **Apply**.

   If the rule definition you selected has **Migrate** or **Move** as a process, you see an additional field, **Destination Data Asset**.
6. (Optional) Select the **Destination Data Asset**.

   You can select a destination data source that is:

   * not the same as the Source data source
   * supported for migration by Data Optimizer and enabled for migration (the **Available for Migration** setting for the data source is **Enabled**)**Note:** If you use an HDFS data source as a source, the **Destination Data Source** field does not appear, because the destination is internally configured in the HDFS cluster.
7. (Optional) Select the **Run rule definition now** checkbox to immediately execute the new rule definition.
8. (Optional) Select **Add Schedule** to set a frequency or a specific time and day to run the metadata rule.
9. Click **Apply**.

   **Note:** Since multiple rules can run simultaneously, if a rule is already running on the Source data source, any additional rule intended for the same data source waits until the running rule finishes. The waiting rule remains in the CREATED state until the running rule finishes, after which the waiting rule can start.

   The metadata rule is created and a confirmation message appears in the upper corner of the page.

To check the progress of the metadata rule, click the **History** tab to view the status.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pentaho.com/pdc-10.2-data-optimizer/pdso-management/pdso-use-rules/pdc-metadata-rules/pdc-creating-a-metadata-rule.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
