[Yandex Cloud documentation](../../../index.md) > [Yandex MetaData Hub](../../index.md) > Apache Hive™ Metastore > Step-by-step guides > Connecting Yandex Data Processing to Apache Hive™ Metastore

# Connecting Yandex Data Processing to Apache Hive™ Metastore

{% note info %}

To use a Apache Hive™ Metastore cluster, your [Yandex Data Processing cluster](../../../data-proc/concepts/index.md) must contain the `SPARK` and `YARN` components.

{% endnote %}

{% list tabs group=instructions %}

- Management console {#console}

    1. [Create](cluster-create.md) a Apache Hive™ Metastore cluster.
    1. When [creating](../../../data-proc/operations/cluster-create.md) or [updating](../../../data-proc/operations/cluster-update.md) a Yandex Data Processing cluster, specify the following [property](../../../data-proc/concepts/settings-list.md):

        ```text
        spark:spark.hive.metastore.uris : thrift://<Apache Hive™ Metastore_cluster_IP_address>:9083
        ```

        To find out the Apache Hive™ Metastore cluster IP address, select **Yandex MetaData Hub** in the [management console](https://console.yandex.cloud) and then select ![image](../../../_assets/console-icons/database.svg) **Metastore** in the left-hand panel. Copy the **IP address** column value for the cluster in question.

    1. If the Apache Hive™ Metastore cluster and Yandex Data Processing cluster are hosted in different cloud networks, set up routing between these cloud networks so that the Apache Hive™ Metastore subnet is accessible from the Yandex Data Processing subnet.

        There are [multiple ways](../../../tutorials/routing/index.md) to configure routing. For example, you can [create an IPsec tunnel](../../../tutorials/routing/ipsec/ipsec-vpn.md).

    1. If the cloud network uses [security groups](../../../vpc/concepts/security-groups.md), set up the security group of the Yandex Data Processing cluster to work with Apache Hive™ Metastore. To do this, [add](../../../vpc/operations/security-group-add-rule.md) the following rule for outgoing traffic:

        * **Port range**: `9083`.
        * **Protocol**: `Any`.
        * **Source**: `CIDR`.
        * **CIDR blocks**: `0.0.0.0/0`.

{% endlist %}

For an example of using Yandex Data Processing with a Apache Hive™ Metastore cluster connected, see [this tutorial](../../tutorials/sharing-tables.md).

_Apache® and [Apache Hive™](https://hive.apache.org/) are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries._