You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/02 08:38:15 UTC

[GitHub] [airflow] alexxi0213 opened a new issue #21929: Elasticsearch hook support DSL

alexxi0213 opened a new issue #21929:
URL: https://github.com/apache/airflow/issues/21929


   ### Description
   
   Current elasticsearch provider hook does not support query with DSL. Can we implement some methods that support user input json to get query results? 
   BTW, why current `ElasticsearchHook's` father class is `DbApiHook`? I thought DbApiHook is for relational database that supports `sqlalchemy`?
   
   ### Use case/motivation
   
   I think the elasticsearch provider hook should be like `MongoHook` that inherit from `BaseHook` and provide more useful methods works out of the box.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #21929: Elasticsearch hook support DSL

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #21929:
URL: https://github.com/apache/airflow/issues/21929#issuecomment-1056575605


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #21929: Elasticsearch hook support DSL

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21929:
URL: https://github.com/apache/airflow/issues/21929#issuecomment-1060065472


   Feel free to add support for that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on issue #21929: Elasticsearch hook support DSL

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #21929:
URL: https://github.com/apache/airflow/issues/21929#issuecomment-1056894877


   > BTW, why current ElasticsearchHook's father class is DbApiHook? I thought DbApiHook is for relational database that supports sqlalchemy?
   
   https://github.com/apache/airflow/blob/602abe8394fafe7de54df7e73af56de848cdf617/airflow/providers/elasticsearch/hooks/elasticsearch.py#L29
   
   [elasticsearch-dbapi](https://github.com/preset-io/elasticsearch-dbapi) is a SQLAlchemy driver for Elasticsearch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] alexxi0213 commented on issue #21929: Elasticsearch hook support DSL

Posted by GitBox <gi...@apache.org>.
alexxi0213 commented on issue #21929:
URL: https://github.com/apache/airflow/issues/21929#issuecomment-1057810394


   > > BTW, why current ElasticsearchHook's father class is DbApiHook? I thought DbApiHook is for relational database that supports sqlalchemy?
   > 
   > https://github.com/apache/airflow/blob/602abe8394fafe7de54df7e73af56de848cdf617/airflow/providers/elasticsearch/hooks/elasticsearch.py#L29
   > 
   > [elasticsearch-dbapi](https://github.com/preset-io/elasticsearch-dbapi) is a SQLAlchemy driver for Elasticsearch.
   
   Oh, I see, but I think most use cases for `elasticsearch` is using the DSL (json format) for filter or keyword search. I would have to implement a custom hook to do that in my use case, also some useful method to manipulate indexes. I would like to contribute that, do you think it's needed?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org