85 lines
1.5 KiB
Markdown
Raw Normal View History

2021-08-01 14:27:44 -07:00
---
2021-08-16 16:52:35 +00:00
description: >-
This guide will help install ElasticSearch connector and run manually to index
the metadata stored in OpenMetadata.
2021-08-01 14:27:44 -07:00
---
# ElasticSearch
{% hint style="info" %}
**Prerequisites**
OpenMetadata is built using Java, DropWizard, Jetty, and MySQL.
1. Python 3.7 or above
2. OpenMetadata Server up and running
2021-08-01 14:27:44 -07:00
{% endhint %}
2021-08-12 14:11:56 -07:00
### Install from PyPI or Source
2021-08-01 14:27:44 -07:00
2021-08-12 14:11:56 -07:00
{% tabs %}
{% tab title="Install Using PyPI" %}
```bash
2021-08-12 14:16:18 -07:00
pip install 'openmetadata-ingestion[elasticsearch]'
2021-08-12 14:11:56 -07:00
```
{% endtab %}
{% endtabs %}
2021-08-01 14:27:44 -07:00
## Run Manually
```bash
metadata ingest -c ./pipelines/metadata_to_es.json
```
### Configuration
2021-10-15 03:51:13 +05:30
{% code title="metadata_to_es.json" %}
```javascript
{
"source": {
"type": "metadata_es",
"config": {}
},
...
```
{% endcode %}
### Publish to OpenMetadata
2021-08-16 16:52:35 +00:00
Below is the configuration to publish Elastic Search data into the OpenMetadata service.
2021-10-15 03:51:13 +05:30
Add Optionally `file` stage and `elasticsearch` bulk_sink along with `metadata-server` config
2021-10-15 03:51:13 +05:30
{% code title="metadata_to_es.json" %}
```javascript
{
"source": {
"type": "metadata_es",
"config": {}
},
"stage": {
"type": "file",
"config": {
"filename": "/tmp/tables.txt"
}
},
"bulk_sink": {
"type": "elasticsearch",
"config": {
"filename": "/tmp/tables.txt",
"es_host_port": "localhost",
"index_name": "table_search_index"
}
},
"metadata_server": {
"type": "metadata-server",
"config": {
"api_endpoint": "http://localhost:8585/api",
"auth_provider_type": "no-auth"
}
}
}
```
{% endcode %}