ElasticsearchSQLHook¶
Elasticsearch Hook that interact with Elasticsearch through the elasticsearch-dbapi
Usage Example¶
es = ElasticsearchSQLHook(elasticsearch_conn_id=CONN_ID)
# Handle ES conn with context manager
with es.get_conn() as es_conn:
tables = es_conn.execute("SHOW TABLES")
for table, *_ in tables:
print(f"table: {table}")
return True