| :py:mod:`airflow.providers.neo4j.hooks.neo4j` |
| ============================================= |
| |
| .. py:module:: airflow.providers.neo4j.hooks.neo4j |
| |
| .. autoapi-nested-parse:: |
| |
| This module allows to connect to a Neo4j database. |
| |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.neo4j.hooks.neo4j.Neo4jHook |
| |
| |
| |
| |
| .. py:class:: Neo4jHook(conn_id = default_conn_name, *args, **kwargs) |
| |
| Bases: :py:obj:`airflow.hooks.base.BaseHook` |
| |
| Interact with Neo4j. |
| |
| Performs a connection to Neo4j and runs the query. |
| |
| :param neo4j_conn_id: Reference to :ref:`Neo4j connection id <howto/connection:neo4j>`. |
| |
| .. py:attribute:: conn_name_attr |
| :annotation: = neo4j_conn_id |
| |
| |
| |
| .. py:attribute:: default_conn_name |
| :annotation: = neo4j_default |
| |
| |
| |
| .. py:attribute:: conn_type |
| :annotation: = neo4j |
| |
| |
| |
| .. py:attribute:: hook_name |
| :annotation: = Neo4j |
| |
| |
| |
| .. py:method:: get_conn(self) |
| |
| Function that initiates a new Neo4j connection |
| with username, password and database schema. |
| |
| |
| .. py:method:: get_uri(self, conn) |
| |
| Build the uri based on extras |
| - Default - uses bolt scheme(bolt://) |
| - neo4j_scheme - neo4j:// |
| - certs_self_signed - neo4j+ssc:// |
| - certs_trusted_ca - neo4j+s:// |
| |
| :param conn: connection object. |
| :return: uri |
| |
| |
| .. py:method:: run(self, query) |
| |
| Function to create a neo4j session |
| and execute the query in the session. |
| |
| :param query: Neo4j query |
| :return: Result |
| |
| |
| |