# Neo4j Tasks
This module contains a collection of tasks to interact with Neo4j.
# Neo4jRunCypherQueryTask
class
prefect.tasks.neo4j.neo4j_tasks.Neo4jRunCypherQueryTask
(server_uri=None, user=None, password=None, db_name=None, server_uri_env_var=None, user_env_var=None, password_env_var=None, db_name_env_var=None, cypher_query=None, return_result_as="raw", **kwargs)[source]Task to run a Cypher query against Neo4j. More information about the Cypher query language, can be found at https://neo4j.com/developer/cypher/. This task uses py2neo under the hood. For more information, please visit https://py2neo.org/2021.1/index.html.
Args:
server_uri (str, optional): The Neo4j URI to connect to. More information regarding the accepted forms forserver_urican be found at https://py2neo.org/2021.1/profiles.html. This parameter, if provided, takes precedence overserver_uri_env_var.user (str, optional): The user to use to connect to Neo4j. This parameter, if provided, takes precedence overuser_env_var.password (str, optional): The password to use to connect to Neo4j. This parameter, if provided, takes precedence overpassword_env_var.db_name: (str, optional): The database name where the Cypher query will run. This parameter, if provided, takes precedence overdb_name_env_var.server_uri_env_var (str, optional): The name of the environment variable that contains the Neo4j server URI to connect to.user_env_var (str, optional): The name of the environment variable that contains the user to use to connect to Neo4j.password_env_var (str, optional): The name of the environment variable that contains the password to use to connect to Neo4j.db_name_env_var (str, optional): The name of the environment variable that contains the database name where the Cypher query will run.cypher_query (str, optional): The Cypher query to run. More information about the Cypher query language, can be found at https://neo4j.com/developer/cypher/.return_result_as (str, optional): How to return the result. Accepted values areraw,dataframe. Defaults toraw(which will return alistofdict). Applies only when the query returned result is not empty.**kwargs (dict, optional): Additional keyword arguments to pass to the Task constructor.
| methods: |
|---|
prefect.tasks.neo4j.neo4j_tasks.Neo4jRunCypherQueryTask.run (server_uri=None, user=None, password=None, db_name=None, server_uri_env_var=None, user_env_var=None, password_env_var=None, db_name_env_var=None, cypher_query=None, return_result_as="raw")[source] |
Task run method to run a Cypher query against Neo4j.
|
This documentation was auto-generated from commit bd9182e
on July 31, 2024 at 18:02 UTC