Ayush Shah 5d6f385a75
Added Filter Params for Table and Schema (#1954)
* Added Filter Params for table and Schema

* Bigquery Doc changes

* Doc Changes for databases

* Filter Pattern Changes

* Table Filter Pattern Example Changes

* Filter Pattern Example Changes
2021-12-29 09:13:09 -08:00

2.4 KiB

description
This guide will help install Hive connector and run manually

Hive

{% hint style="info" %} Prerequisites

  1. Python 3.7 or above
  2. Library: libsasl2-dev Hive connector uses pyhive to connect and fetch metadata. Pyhive has python sasl dependency and which requires libsasl2-dev to be installed. In some cases, you may need to set LD_LIBRARY_PATH to point to where libsasl2-dev is installed. Please check on how to install libsasl2 for your Linux Distro. {% endhint %}

Install from PyPI

{% tabs %} {% tab title="Install Using PyPI" %}

#install hive-sasl library
sudo apt-get install libsasl2-dev
pip install 'openmetadata-ingestion[hive]'

{% endtab %} {% endtabs %}

Configuration

{% code title="hive.json" %}

{
  "source": {
    "type": "hive",
    "config": {
      "service_name": "local_hive",
      "host_port": "localhost:10000",
      "data_profiler_enabled": "true",
      "data_profiler_offset": "0",
      "data_profiler_limit": "50000"
    }
  },
  ...

{% endcode %}

  1. service_name - Service Name for this Hive cluster. If you added the Hive cluster through OpenMetadata UI, make sure the service name matches the same.
  2. table_filter_pattern - It contains includes, excludes options to choose which pattern of tables you want to ingest into OpenMetadata.
  3. schema_filter_pattern - It contains includes, excludes options to choose which pattern of schemas you want to ingest into OpenMetadata.
  4. data_profiler_enabled - Enable data-profiling (Optional). It will provide you the newly ingested data.
  5. data_profiler_offset - Specify offset.
  6. data_profiler_limit - Specify limit.

Publish to OpenMetadata

Below is the configuration to publish Hive data into the OpenMetadata service.

Add metadata-rest sink along with metadata-server config

{% code title="hive.json" %}

{
  "source": {
    "type": "hive",
    "config": {
      "service_name": "local_hive",
      "host_port": "localhost:10000",
      "data_profiler_enabled": "true",
      "data_profiler_offset": "0",
      "data_profiler_limit": "50000"
    }
  },
  "sink": {
    "type": "metadata-rest",
    "config": {}
  },
  "metadata_server": {
    "type": "metadata-server",
    "config": {
      "api_endpoint": "http://localhost:8585/api",
      "auth_provider_type": "no-auth"
    }
  }
}

{% endcode %}