# Read metadata from HCP

You can use the Read metadata from HCP step to identify and select an HCP object by its URL, then read custom metadata from a selected annotation.

The step returns the requested custom metadata to your transformation for downstream processing. You can use [Write metadata to HCP](/pdia-data-integration/pdi-transformation-steps-reference-overview/write-metadata-to-hcp.md) to modify the metadata and write it back to HCP.

[Hitachi Content Platform (HCP)](/pdia-data-integration/extracting-data-into-pdi/pdi-and-hitachi-content-platform-hcp.md) is an object-based storage repository designed for unstructured data. To add structure and control, HCP supports metadata annotations associated with each object.

An HCP object consists of a read-only file, a unique URL, system metadata properties, and custom metadata annotations. Each annotation has its own name (for example, `myannotation0515202`).

### General

* **Step name**: Specify the unique name of the transformation step on the canvas. You can customize the name or leave it as the default.

### Options

![Read metadata from HCP step](/files/vpNKtaaO6fC1Pzl2AQd3)

Specify the HCP object URL to locate, and select the default annotation or a specific annotation name to read.

You can provide the object URL and annotation name in either of these ways:

* Use incoming fields in the transformation (recommended).
* Enter values manually.

You can create and populate incoming fields by using transformation variables or by using values from other steps (for example, [Query HCP](/pdia-data-integration/pdi-transformation-steps-reference-overview/query-hcp.md), Data Grid, or Get File Names).

| Option                                        | Description                                                                                                                                                                                                 |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **HCP VFS connection**                        | Select the VFS connection used to connect to your HCP repository. For background, see [Connecting to Virtual File Systems](/pdia-data-integration/extracting-data-into-pdi/virtual-file-system-browser.md). |
| **Select incoming field for your object URL** | Select the incoming text field that contains the target HCP object URL. You can also enter the object URL directly. Example: `https://your-hcp-namespace.example.com/path/object.bin`.                      |
| **Annotation to read from**                   | Select the annotation name to read:                                                                                                                                                                         |

* **Use default**: Reads the default annotation (`default`) associated with the object.
* **Incoming field**: Select an incoming field that contains the annotation name.
* **Manual**: Enter an annotation name (maximum 32 characters), for example `myannotation0515202`.

In all cases, the annotation must exist for the object URL you specified. | | **Outgoing field** | Name of the output field that contains the metadata read from the selected object URL and annotation name. |

### See also

* [Query HCP](/pdia-data-integration/pdi-transformation-steps-reference-overview/query-hcp.md)
* [Write metadata to HCP](/pdia-data-integration/pdi-transformation-steps-reference-overview/write-metadata-to-hcp.md)
* [Hitachi Content Platform documentation](https://knowledge.hitachivantara.com/Documents/Storage/Content_Platform)


---

# 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.pentaho.com/pdia-data-integration/pdi-transformation-steps-reference-overview/read-metadata-from-hcp.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.
