# Generating Metadata

Before using a data source in appRules, the metadata must be generated.    Metadata is created when you add a new data source and select the connection associated or when you specifically 'Regenerate Metadata' on the toolbar.

<figure><img src="/files/5d1P5f4qMiiVly9P5hIH" alt=""><figcaption></figcaption></figure>

To generate metadata, first configure the [connection properties](/apprules-r-documentation/platform/platform-features/system-settings/data-sources/connection-settings.md) and click the 'Create Metadata button' or Refresh metadata (when the datasource already exists) to continue.

A Datasource can have different connection associated for each environment (Test, Production...) but the Metadata is unique. If your environnements metadata models are different, define several datasources.

<figure><img src="/files/pIrzgaw4HT0SmKjiQ8gr" alt=""><figcaption></figcaption></figure>

The environments are defined in the [RuntimeSettings](/apprules-r-documentation/platform/platform-features/system-settings/runtime-settings.md) section.


---

# Agent Instructions: 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:

```
GET https://docs.appstrategy.com/apprules-r-documentation/platform/platform-features/system-settings/data-sources/generating-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
