Neo4jOperator¶
Use the Neo4jOperator
to execute
SQL commands in a Neo4j database.
Using the Operator¶
Use the neo4j_conn_id
argument to connect to your Neo4j instance where
the connection metadata is structured as follows:
Parameter |
Input |
---|---|
Host: string |
Neo4j hostname |
Schema: string |
Database name |
Login: string |
Neo4j user |
Password: string |
Neo4j user password |
Port: int |
Neo4j port |
neo4j_task = Neo4jOperator(
task_id="run_neo4j_query",
neo4j_conn_id="neo4j_conn_id",
sql='MATCH (tom {name: "Tom Hanks", date: "{{ds}}"}) RETURN tom',
dag=dag,
)