From abbe9e7ff674189ad601053873de3c943df4193f Mon Sep 17 00:00:00 2001 From: DavIvek Date: Fri, 27 Feb 2026 14:45:36 +0100 Subject: [PATCH 1/6] add server side params docs --- pages/database-management/_meta.ts | 1 + pages/database-management/configuration.mdx | 4 + .../server-side-parameters.mdx | 105 ++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 pages/database-management/server-side-parameters.mdx diff --git a/pages/database-management/_meta.ts b/pages/database-management/_meta.ts index cb0c5a2e0..801f27ca3 100644 --- a/pages/database-management/_meta.ts +++ b/pages/database-management/_meta.ts @@ -9,6 +9,7 @@ export default { "monitoring": "Monitoring", "multi-tenancy": "Multi-tenancy", "query-metadata": "Query metadata", + "server-side-parameters": "Server-side parameters", "server-stats": "Server stats", "ssl-encryption": "SSL encryption", "system-configuration": "System configuration" diff --git a/pages/database-management/configuration.mdx b/pages/database-management/configuration.mdx index 6fe01b68d..63b982f48 100644 --- a/pages/database-management/configuration.mdx +++ b/pages/database-management/configuration.mdx @@ -342,6 +342,10 @@ If you want to change a value for a specific setting, following query should be SET DATABASE SETTING "setting.name" TO "some-value"; ``` +For reusable query values accessed as `$name`, see +[Server-side parameters](/database-management/server-side-parameters). Unlike +database settings, server-side parameters are resolved during query execution. + ### Multitenancy and configuration If you are using a multi-tenant architecture, all isolated databases share diff --git a/pages/database-management/server-side-parameters.mdx b/pages/database-management/server-side-parameters.mdx new file mode 100644 index 000000000..ebf4c1ace --- /dev/null +++ b/pages/database-management/server-side-parameters.mdx @@ -0,0 +1,105 @@ +--- +title: Server-side parameters +description: Configure and reuse server-side parameters in Memgraph with database or global scope. +--- + +# Server-side parameters + +Server-side parameters are named values stored by Memgraph and reusable in +queries through `$parameterName`, just like user-provided parameters. + +They are useful when you want reusable defaults (for example across sessions), +while still allowing clients to override values when needed. + +## Parameter scopes + +Server-side parameters support two scopes: + +- **Database scope**: set with `SET PARAMETER ...`; visible only in the current + database. +- **Global scope**: set with `SET GLOBAL PARAMETER ...`; visible across + databases. + +When you run `SHOW PARAMETERS`, Memgraph returns: +- all global parameters +- parameters from the current database + +## Resolution order + +When a query uses `$name`, values are resolved in this order: + +1. user-provided query parameter (from the client) +2. database-scoped server-side parameter +3. global server-side parameter + +This means: +- user-provided parameters are preferred over server-side parameters +- database-scoped server-side parameters are preferred over global ones + +## Set a parameter + +Use `SET PARAMETER` for database scope, or `SET GLOBAL PARAMETER` for global +scope. + +```opencypher +SET PARAMETER x = 'db_value'; +SET GLOBAL PARAMETER x = 'global_value'; +``` + +You can set the value from: +- a literal +- a user-provided parameter (for example `$config`) +- a map value + +```opencypher +SET GLOBAL PARAMETER app_config = $config; +SET GLOBAL PARAMETER limits = {timeout: 120, mode: 'safe'}; +SET GLOBAL PARAMETER ids = [10, 20, 30]; +``` + +## Unset a parameter + +Remove a parameter by name in either database or global scope. + +```opencypher +UNSET PARAMETER x; +UNSET GLOBAL PARAMETER x; +``` + +## Show parameters + +List current server-side parameters: + +```opencypher +SHOW PARAMETERS; +``` + +Output columns: +- `name`: parameter name +- `value`: stored value (JSON-encoded string form) +- `scope`: `database` or `global` + +## Use in queries with `$` + +Once set, server-side parameters are available as `$name` in queries: + +```opencypher +SET GLOBAL PARAMETER tenant = 'acme'; +CREATE (:Account {tenant: $tenant}); +``` + +If the client sends a user parameter with the same name, that user value is +used first: + +```opencypher +SET GLOBAL PARAMETER x = 'server_value'; +CREATE (:Node {property: $x}); +``` + +If the query is run with user parameter `x = 'client_value'`, the node property +will be `'client_value'`. + +## Privileges + +Server-side parameter queries require the `SERVER_SIDE_PARAMETERS` privilege. +See the [Query privileges reference](/database-management/authentication-and-authorization/query-privileges). From fdc56a979f34a512470a68256219baa5194bac47 Mon Sep 17 00:00:00 2001 From: DavIvek Date: Fri, 27 Feb 2026 18:15:02 +0100 Subject: [PATCH 2/6] update privileges page --- .../authentication-and-authorization/query-privileges.mdx | 3 +++ pages/database-management/server-side-parameters.mdx | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/database-management/authentication-and-authorization/query-privileges.mdx b/pages/database-management/authentication-and-authorization/query-privileges.mdx index d24575f88..ba0e6fdc3 100644 --- a/pages/database-management/authentication-and-authorization/query-privileges.mdx +++ b/pages/database-management/authentication-and-authorization/query-privileges.mdx @@ -124,6 +124,9 @@ Memgraph's privilege system controls access to various database operations throu | `DATA DIRECTORY LOCK STATUS` | `DURABILITY` | `DATA DIRECTORY LOCK STATUS` | | `FREE MEMORY` | `FREE_MEMORY` | `FREE MEMORY` | | `SHOW CONFIG` | `CONFIG` | `SHOW CONFIG` | +| `SET [GLOBAL] PARAMETER` | `SERVER_SIDE_PARAMETERS` | `SET GLOBAL PARAMETER x = 'value'` | +| `UNSET [GLOBAL] PARAMETER` | `SERVER_SIDE_PARAMETERS` | `UNSET PARAMETER x` | +| `SHOW PARAMETERS` | `SERVER_SIDE_PARAMETERS` | `SHOW PARAMETERS` | | `CREATE TRIGGER` | `TRIGGER` | `CREATE TRIGGER ...` | | `DROP TRIGGER` | `TRIGGER` | `DROP TRIGGER ...` | | `SHOW TRIGGERS` | `TRIGGER` | `SHOW TRIGGERS` | diff --git a/pages/database-management/server-side-parameters.mdx b/pages/database-management/server-side-parameters.mdx index ebf4c1ace..fbe26ea6e 100644 --- a/pages/database-management/server-side-parameters.mdx +++ b/pages/database-management/server-side-parameters.mdx @@ -8,8 +8,7 @@ description: Configure and reuse server-side parameters in Memgraph with databas Server-side parameters are named values stored by Memgraph and reusable in queries through `$parameterName`, just like user-provided parameters. -They are useful when you want reusable defaults (for example across sessions), -while still allowing clients to override values when needed. +They are useful when you want reusable defaults, while still allowing clients to override values when needed. ## Parameter scopes From 0f51191535c7cfc82ce755a1f8e56af2ec674e38 Mon Sep 17 00:00:00 2001 From: DavIvek Date: Fri, 27 Feb 2026 18:33:12 +0100 Subject: [PATCH 3/6] link on atomic pipeline page --- .../graph-rag/atomic-pipelines.mdx | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 pages/ai-ecosystem/graph-rag/atomic-pipelines.mdx diff --git a/pages/ai-ecosystem/graph-rag/atomic-pipelines.mdx b/pages/ai-ecosystem/graph-rag/atomic-pipelines.mdx new file mode 100644 index 000000000..f60f5220d --- /dev/null +++ b/pages/ai-ecosystem/graph-rag/atomic-pipelines.mdx @@ -0,0 +1,75 @@ +--- +title: GraphRAG Pipelines +description: Overview of typical pipelines in a GraphRAG system, covering verious retrieval types. +--- + +# Atomic GraphRAG Pipelines + +Memgraph provides a comprehensive suite of tools and algorithms that make +building GraphRAG systems both efficient and scalable. These tools, known as +"Atomic GraphRAG Pipelines," empower you (or an agent) to implement +sophisticated pipelines as atomic database queries. + +Here’s how each feature plays a role +in enhancing your Retrieval-Augmented Generation workflows: + +1. [Vector search](/querying/vector-search): A pivotal first step for extracting +relevant information during pivot search. Vector search allows you to perform +semantic searches, matching context or meaning rather than exact terms. +2. [Deep-path traversals](/advanced-algorithms/deep-path-traversal): Enables +rapid navigation through complex relationships in your graph, supporting +multi-hop queries and reasoning across interconnected data. +3. [Leiden community +detection](/advanced-algorithms/available-algorithms/leiden_community_detection): +A faster, more accurate algorithm than Louvain, Leiden ensures well-connected +communities, making it ideal for relevance expansion in retrieval processes. +4. [Louvain](/advanced-algorithms/available-algorithms/community_detection) and +[dynamic community +detection](/advanced-algorithms/available-algorithms/community_detection_online): +Louvain is a foundational clustering algorithm for discovering communities, +while dynamic community detection adapts in real time, accommodating graph +updates without compromising cluster integrity. +5. [PageRank](/advanced-algorithms/available-algorithms/pagerank) and [dynamic +PageRank](/advanced-algorithms/available-algorithms/pagerank_online): +PageRank ranks nodes based on their influence or importance. Its dynamic +counterpart adjusts these rankings as new data is ingested, ensuring retrieval +results remain relevant. +6. [Text search](/querying/text-search): Facilitates keyword-based searches, +allowing you to locate specific entities or relationships within your graph +quickly. This complements vector search for hybrid retrieval strategies. +7. [Geospatial search](/fundamentals/data-types#point): Geospatial search +enables you to integrate and retrieve location-based insights, enhancing the +relevance and precision of responses. +8. [Run-time schema tracking under `SHOW SCHEMA INFO` +query](/querying/schema#run-time-schema-tracking): Tracks schema changes as they +happen, enabling seamless updates and adaptations in your graph structure +without manual intervention. This is especially useful if you're including +schema into the LLM context. +9. [Real-time data ingestion](/data-streams): Memgraph supports seamless +integration with streaming platforms like Kafka, Redpanda, and Pulsar, allowing +you to continuously grow and update your knowledge graph. Combine this +with [Memgraph MAGE](/advanced-algorithms) or [custom +procedures](/custom-query-modules) to dynamically query and analyze incoming +data. +10. Embedding procedures [`embeddings.text` and +`embeddings.node_sentence`](/advanced-algorithms/available-algorithms/embeddings): +Offer the ability to compute embeddings during the preprocessing or retrieval +stages. +11. [`llm.complete`](/advanced-algorithms/available-algorithms/llm) function: +Allows you to call any LLM under any given Cypher query. +12. [Server-side parameters](/database-management/server-side-parameters): +Enable you to pass and manage runtime configuration (for example, model names, +thresholds, or limits) directly within a query or pipeline, without rewriting +Cypher logic. + +Based on the above primitives, there are a few main GraphRAG pipeline types: +- **Analytical**: When you need an exact database query to fetch specific data +(e.g., deterministic counting), use +[Text2Cypher](/ai-ecosystem/graph-rag/atomic-pipelines/text2cypher) +- **Local**: To retrieve a focused subset of your data for more contextual +answers, leverage [Local Graph Search](/ai-ecosystem/graph-rag/atomic-pipelines/local-graph-search) +- **Global**: For cases where the entire dataset requires advanced processing or +summarization, apply [Query-focused +Summarization](/ai-ecosystem/graph-rag/atomic-pipelines/query-focused-summarization). + +![atomic_graphrag_pipelines](/pages/ai-ecosystem/graph-rag/atomic-pipelines/atomic-graphrag-pipelines.svg) \ No newline at end of file From c869ca7d0445dd9898a64ea41658cdd903ccc01b Mon Sep 17 00:00:00 2001 From: DavIvek Date: Fri, 27 Feb 2026 19:57:03 +0100 Subject: [PATCH 4/6] add as example with migrate module --- .../available-algorithms/migrate.mdx | 13 ++++++ .../server-side-parameters.mdx | 46 +++++++++++++++++-- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/pages/advanced-algorithms/available-algorithms/migrate.mdx b/pages/advanced-algorithms/available-algorithms/migrate.mdx index 4609c2c63..08f1175e0 100644 --- a/pages/advanced-algorithms/available-algorithms/migrate.mdx +++ b/pages/advanced-algorithms/available-algorithms/migrate.mdx @@ -32,6 +32,19 @@ filter, and convert relational data into a graph format. | **Implementation** | Python | | **Parallelism** | sequential | + +When running multiple migrations against the same source, avoid repeating the `config` map in every call. +Use [server-side parameters](/database-management/server-side-parameters) to store the connection config once +and reference it as `$config` across all your queries: + +```cypher +SET GLOBAL PARAMETER pg_config = {user: 'memgraph', password: 'password', host: 'localhost', database: 'demo_db'}; + +CALL migrate.postgresql('users', $pg_config) YIELD row CREATE (u:User {id: row.id}); +CALL migrate.postgresql('orders', $pg_config) YIELD row CREATE (o:Order {id: row.id}); +``` + + --- ## Procedures diff --git a/pages/database-management/server-side-parameters.mdx b/pages/database-management/server-side-parameters.mdx index fbe26ea6e..361f683e2 100644 --- a/pages/database-management/server-side-parameters.mdx +++ b/pages/database-management/server-side-parameters.mdx @@ -78,7 +78,14 @@ Output columns: - `value`: stored value (JSON-encoded string form) - `scope`: `database` or `global` -## Use in queries with `$` +## Privileges + +Server-side parameter queries require the `SERVER_SIDE_PARAMETERS` privilege. +See the [Query privileges reference](/database-management/authentication-and-authorization/query-privileges). + +## Use cases + +### Use in queries with `$` Once set, server-side parameters are available as `$name` in queries: @@ -98,7 +105,38 @@ CREATE (:Node {property: $x}); If the query is run with user parameter `x = 'client_value'`, the node property will be `'client_value'`. -## Privileges +### Reusing connection config in data migrations -Server-side parameter queries require the `SERVER_SIDE_PARAMETERS` privilege. -See the [Query privileges reference](/database-management/authentication-and-authorization/query-privileges). +The [`migrate` module](/advanced-algorithms/available-algorithms/migrate) procedures accept a `config` map with +connection parameters like `host`, `port`, `user`, and `password`. When running multiple migration queries +against the same source, repeating this map in every call is verbose and error-prone. + +Store the config once as a server-side parameter and reference it with `$config` across all your migration queries: + +```opencypher +SET GLOBAL PARAMETER mysql_config = { + user: 'memgraph', + password: 'password', + host: 'localhost', + database: 'demo_db' +}; +``` + +Then use `$mysql_config` in every migration call instead of repeating the full map: + +```opencypher +CALL migrate.mysql('users', $mysql_config) +YIELD row +CREATE (u:User {id: row.id, name: row.name}); + +CALL migrate.mysql('orders', $mysql_config) +YIELD row +CREATE (o:Order {id: row.id, total: row.total}); + +CALL migrate.mysql('SELECT user_id, order_id FROM user_orders', $mysql_config) +YIELD row +MATCH (u:User {id: row.user_id}), (o:Order {id: row.order_id}) +CREATE (u)-[:PLACED]->(o); +``` + +This works for all `migrate` procedures — `migrate.postgresql()`, `migrate.mysql()`, `migrate.neo4j()`, `migrate.sql_server()`, and others. From 8acd248c29067b5e84af513dc0f46a08387a74ac Mon Sep 17 00:00:00 2001 From: DavIvek Date: Fri, 27 Feb 2026 20:00:46 +0100 Subject: [PATCH 5/6] minor fix --- pages/advanced-algorithms/available-algorithms/migrate.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/advanced-algorithms/available-algorithms/migrate.mdx b/pages/advanced-algorithms/available-algorithms/migrate.mdx index 08f1175e0..884b57e6d 100644 --- a/pages/advanced-algorithms/available-algorithms/migrate.mdx +++ b/pages/advanced-algorithms/available-algorithms/migrate.mdx @@ -32,7 +32,7 @@ filter, and convert relational data into a graph format. | **Implementation** | Python | | **Parallelism** | sequential | - + When running multiple migrations against the same source, avoid repeating the `config` map in every call. Use [server-side parameters](/database-management/server-side-parameters) to store the connection config once and reference it as `$config` across all your queries: From be82a26262a395b2f3bcfde4850cdc23ee3bf63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Budiseli=C4=87?= Date: Wed, 11 Mar 2026 20:16:44 +0100 Subject: [PATCH 6/6] Fix link format for server-side parameters Updated the link format for server-side parameters and improved clarity. --- pages/ai-ecosystem/graph-rag/atomic-pipelines.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/ai-ecosystem/graph-rag/atomic-pipelines.mdx b/pages/ai-ecosystem/graph-rag/atomic-pipelines.mdx index b175db538..af2e7a8b2 100644 --- a/pages/ai-ecosystem/graph-rag/atomic-pipelines.mdx +++ b/pages/ai-ecosystem/graph-rag/atomic-pipelines.mdx @@ -57,9 +57,9 @@ Offer the ability to compute embeddings during the preprocessing or retrieval stages. 11. [`llm.complete`](/advanced-algorithms/available-algorithms/llm) function: Allows you to call any LLM under any given Cypher query. -12. Server-side parameters: Could be used for many different things, but in this -context, the parameters help you with managing configuration under any given -query or pipeline. +12. [Server-side parameters](/database-management/server-side-parameters): Could +be used for many different things, but in this context, the parameters help you +managing configuration under any given query or pipeline. ## Question and Pipeline Types