Skip to main content

How-to guides overview

This section will teach you how to use object graph mapper (OGM) and query builder from the GQLAlchemy. Here you will find step-by-step guides for the most common usage of OGM and query builder, depending on the current GQLAlchemy capabilities. If you are a Python developer not that familiar with Cypher query language, you will find the how-to guides very useful.

Object graph mapper​

Object graph mapper (OGM) in GQLAlchemy maps Python classes to nodes and relationships in graph database and converts function calls to Cypher queries. To learn more about how to use OGM, take at OGM how-to guide.

Query builder​

When working with GQLAlchemy, you can connect to the database and execute Cypher queries using the query builder. To learn more about how to create a query using query builder, check out the query builder how-to guide.

Stream & trigger support​

You can create streams and database triggers directly from GQLAlchemy. Check out the following guides:

Import data from different sources​

info

The features below aren’t included in the default GQLAlchemy installation. To use them, make sure to install GQLAlchemy with the relevant optional dependencies.

You can translate table data from a file to graph data and import it to Memgraph. Currently, we support reading of CSV, Parquet, ORC and IPC/Feather/Arrow file formats via the PyArrow package.

You can use loaders.py which implements loading data from the local file system, as well as Azure Blob and Amazon S3 remote file systems:

The other way to import data is to implement a custom file system importer:

Instance runner​

There are two ways of managing a Memgraph instance with the instance_runner module:

On-disk storage​

Since Memgraph is an in-memory graph database, the GQLAlchemy library provides an on-disk storage solution for large properties that don’t need to be used in any of the graph algorithms. Learn how to use on-disk storage in the following guide: