mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 17:34:41 +00:00
parent
06d9329ae3
commit
15d0440599
@ -13,6 +13,7 @@ import json
|
||||
import logging
|
||||
import ssl
|
||||
import time
|
||||
import traceback
|
||||
from datetime import datetime
|
||||
from typing import List, Optional
|
||||
|
||||
@ -205,6 +206,7 @@ class ElasticsearchSink(Sink[Entity]):
|
||||
)
|
||||
|
||||
def write_record(self, record: Entity) -> None:
|
||||
try:
|
||||
if isinstance(record, Table):
|
||||
table_doc = self._create_table_es_doc(record)
|
||||
self.elasticsearch_client.index(
|
||||
@ -270,6 +272,9 @@ class ElasticsearchSink(Sink[Entity]):
|
||||
self.status.records_written(record.name.__root__)
|
||||
else:
|
||||
self.status.records_written(record.name)
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to index entity {record} due to {e}")
|
||||
logger.debug(traceback.print_exc())
|
||||
|
||||
def _create_table_es_doc(self, table: Table):
|
||||
fqdn = table.fullyQualifiedName
|
||||
|
Loading…
x
Reference in New Issue
Block a user