Query HCP

The Query HCP step uses the Metadata Query Engine (MQE)arrow-up-right to query your Hitachi Content Platform (HCP)arrow-up-right repository for objects, their URLs, and system metadata properties.

You can use the resulting object URL to define HCP object and custom metadata locations for the PDI Read metadata from HCP and Write metadata to HCP steps.

circle-info

After modifying an HCP object, the change might not appear in query results until the search index is updated.

Before you begin

In the HCP Tenant Management Console and System Management Console, set up HCP for queries from PDI:

  1. In the Tenant Management Console at the tenant level, verify the following options are selected for your namespace:

    1. Under the Protocols tab, select Enable REST API.

    2. Under the Settings tab, select Enable ACLs.

    For details, see:

  2. In the System Management Console, go to the Services tab and verify that the following MQE (Metadata Query Engine) options are selected:

    • Enable metadata query API

    • Enable indexing

    • Enable indexing of custom metadata

    For details, see Configuring the metadata query enginearrow-up-right.

  3. In the Tenant Management Console at the namespace level, go to the Services tab and verify that the following Search options are selected:

    • Enable search

    • Enable indexing

    • Enable indexing of custom metadata

    • Enable full custom metadata indexing

    For details, see Setting search and indexing optionsarrow-up-right.

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.

Query tab

Query tab in the Query HCP step

In this tab, select the VFS connection to connect to your HCP repository, and then refine your search with a query statement and other options.

Option
Description

HCP VFS connection

Select the VFS connection you created for this transformation to connect to your HCP repository.

Query statement

Specify your HCP MQE search statement for finding particular objects. For example, to find objects of 2000 MB or larger, specify +(size[2000 TO *]).

Sort results by

Select which object properties you want to use to sort the results in Ascending or Descending order.

Number of rows to skip

(Optional) Specify the number of objects to skip in the results. This is useful when paging through results.

Number of results to return

(Optional) Specify the maximum number of objects to return (maximum 10000). If you do not specify a value, HCP returns up to 100 objects. You can also specify -1 (return all objects up to 10000) or 0 (return only the total object count).

Generate a query statement in HCP

You can use the HCP Namespace Browser to generate an advanced query statement:

1

Set filters

In the HCP Namespace Browser, set filters in the Structured Query tab.

2

Show the advanced query

Select Show as advanced query.

3

Copy the query statement

Copy the generated statement from the Advanced Query tab and paste it into Query statement.

For more information, see:

Page through objects

Use Number of rows to skip and Number of results to return to page through objects in your HCP repository.

  1. Set Number of results to return to 0 to obtain the total object count.

  2. Query again for a specific number of objects at an offset by setting Number of rows to skip.

Within a PDI transformation, you can loop over the Query HCP step and update the offset with a variable.

For details, see Paged queries with object-based requestsarrow-up-right.

Output tab

Output tab in the Query HCP step

In this tab, specify the PDI fields for the resulting object URLs and system metadata properties.

Option
Description

Outgoing field for object URL

Specify the name of the PDI field that will contain the URL of a resulting object.

Return all object properties

Select to include system metadata properties associated with the resulting objects. If you clear this option, object properties are not included.

Outgoing field for object properties

If you select Return all object properties, specify the name of the PDI field that will contain the system metadata properties of a resulting object.

See also

Last updated

Was this helpful?