> [!CAUTION]
> **Caution** : Document AI Warehouse is deprecated and will no longer be available on Google Cloud after January 16, 2025. To safeguard your data, migrate any documents currently saved in Document AI Warehouse to an alternative like Cloud Storage. Verify that your data migration is completed before the discontinuation date to prevent any data loss. See [Deprecations](https://docs.cloud.google.com/document-warehouse/docs/deprecations) for details.

<br />

If you need to convert extracted entities to Document AI Warehouse properties, you
need to set or update the schema.

> [!NOTE]
> **Note:** Only ingestion and Process-with-Document AI pipelines support schema mapping. Regular document creation calls do not trigger mapping.

Before you set the schema with mapping, you need to know the
Document AI processor types and their schemas and entity types. The
pipeline flattens the nested entities, so you also need to create mappings for
the child entities.

For example, the processor `INVOICE_PROCESSOR` has the following entity types:

- `line_item`
- `line_item/amount`
- `total_amount`

> [!NOTE]
> **Note:** All entities whose entity types are not in the schema (property name or schema_source name) will be discarded.

    {
      "property_definitions": [
        {
          "name": "line_item",
          "display_name": "line_item",
          "is_searchable": true,
          "is_filterable": true,
          "text_type_options": {}
        },
        {
          "name": "my_new_receiver_name",
          "display_name": "my_new_receiver_name",
          "is_searchable": true,
          "is_filterable": true,
          "text_type_options": {},
          "schema_sources": [
            {
              "name": "receiver_name_in_invoice",
              "processor_type": "INVOICE_PROCESSOR"
            },
            {
              "name": "receiver_name_in_w2",
              "processor_type": "FORM_W2_PROCESSOR"
            }
          ]
        }
      ]
    }

If you want to keep the property name the same as the entity type, you can
directly use the name, such as `line_item` in the above example. If you want to
convert all entities with type `receiver_name_in_invoice` from the invoice
processor and with `receiver_name_in_w2` from the form W2 processor to your new
name `my_new_receiver_name`, you can add the mappings in the `schema_sources`
field like the above example. But after converting, use `my_new_receiver_name`
for searching and filtering. The property names and schema_source names should
be unique.