Reverse Metadata is an advanced feature in OpenMetadata that facilitates bi-directional synchronization between OpenMetadata and the source database systems. While standard ingestion pulls metadata into OpenMetadata, reverse ingestion enables pushing metadata changes made within OpenMetadata back to the source systems. This ensures consistency and alignment across the entire data infrastructure.
Reverse Metadata uses the existing service connection configuration provided during the initial metadata ingestion. You do not need to reconfigure the service connection. In order to use Reverse Metadata, this connections must use a role with write permissions.
You can define a custom SQL template to handle the metadata changes. The template is interpreted using python f-strings.
These are the available variables:
| Variable | Description | Context | Type |
|----------|-------------| --- | --- |
| `database` | The identifier of the database or catalog | Always | String |
| `schema` | The identifier of the schema | Always | String |
| `table` | The identifier of the table | Always | String |
| `column` | The identifier of the column | Always | String |
| `description` | Refers to the description | Description update | String |
| `owner` | The identifier of the owner being added or removed. This value can be a username or an email and depends on the source system. | Owner update | String |
| `tag_key` | The key of the tag being added or removed (Classification) | Tag update | String |
| `tag_value` | The value of the tag being added or removed | Tag update | String |
| `tags` | Refers to a list of tags (e.g., BigQuery). Example: [('my_tag', 'value'), ('env', 'prod')] | Always | List[Tuple[String, String]] |
You can see examples of custom SQL templates in the specific connector documentation.
When updating tags during reverse ingestion, it is important to understand the difference in tag structures. Most databases support key-value pairs for tags, whereas OpenMetadata organizes tags using classifications and tag names. During reverse ingestion, OpenMetadata maps the classification name as the tag key and the tag name as the tag value. If a new tag from the same classification is applied to a data asset that already has a tag from that classification, the reverse ingestion process may raise an ambiguous tag error. This behavior is intended to prevent accidental overwriting of existing tags at the source system.