Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to latest GQLAlchemy #29

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
kafka-python
gqlalchemy
kafka-python==2.0.2
git+https://github.com/memgraph/gqlalchemy.git@add-create-stream
5 changes: 5 additions & 0 deletions memgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ creates required indexes, constraints, and triggers.
```bash
bash run.sh memgraph
```

## NOTES

Memgraph transform script inside `query_modules` can NOT be called `kafka.py`
because of a conflict with the `KAFKA` clause.
4 changes: 4 additions & 0 deletions memgraph/gqlalchmey/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from gqlalchemy import Memgraph

if __name__ == "__main__":
pass
1 change: 1 addition & 0 deletions memgraph/gqlalchmey/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git+https://github.com/memgraph/gqlalchemy.git@add-create-stream
2 changes: 1 addition & 1 deletion memgraph/queries/create_stream.cypher
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CREATE STREAM kafkaStream TOPICS topic TRANSFORM kafka.transform;
CREATE KAFKA STREAM kafkaStream TOPICS topic TRANSFORM kafka_stream.transform;
File renamed without changes.
5 changes: 5 additions & 0 deletions memgraph/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ script_help_and_exit () {
echo " action - takes a filename (excluding the extension) from the"
echo " queries directory. The file contains a query that will"
echo " be executed in the running Memgraph instance"
echo " init_gqlalchemy - initializes Memgraph using GQLAlchmey"
exit 1
}

Expand Down Expand Up @@ -83,6 +84,10 @@ case "$action" in
init
;;

init_gqlalchemy)
python3 gqlalchmey/main.py
;;

drop)
drop
;;
Expand Down