diff --git a/pages/memgraph-zero/memgql/_meta.ts b/pages/memgraph-zero/memgql/_meta.ts index 287f964f9..945f2bafd 100644 --- a/pages/memgraph-zero/memgql/_meta.ts +++ b/pages/memgraph-zero/memgql/_meta.ts @@ -9,4 +9,5 @@ export default { "reference": "Reference", "licensing": "Licensing", "changelog": "Changelog", + "telemetry": "Telemetry", } diff --git a/pages/memgraph-zero/memgql/changelog.mdx b/pages/memgraph-zero/memgql/changelog.mdx index 819449a29..b2a01d723 100644 --- a/pages/memgraph-zero/memgql/changelog.mdx +++ b/pages/memgraph-zero/memgql/changelog.mdx @@ -5,6 +5,67 @@ description: MemGQL release notes # MemGQL Changelog +## MemGQL v0.13.0 - October 7th, 2026 + +### 🍃 New features & Improvements + +- **Multi-label vertex mappings.** A vertex may declare + `"labels": ["Cat", "Animal"]` instead of a single `label`. The first label + identifies the mapping; the others may be shared with other mappings. A + pattern on a shared label (`MATCH (a:Animal)`) reads every table that + carries it as one `UNION` inside the connector, resolving shared property + names through each table's own columns and returning `null` for a property + only some of them declare. Returned nodes carry all of their labels. See + [Vertices](/memgraph-zero/memgql/schema-file#vertices). +- **`--bolt-address` and `--bolt-port`.** The Bolt listener's interface and + port as flags, alongside `BOLT_LISTEN_ADDR`; each flag replaces only its half + of the address, so `--bolt-port=7690` starts a second server beside the + first. `--bolt-address=127.0.0.1` keeps a server local. See + [Configuration](/memgraph-zero/memgql/reference#configuration-reference). +- **Join edges within one connector.** `mappedJoinSource` now also links two + tables in the same relational connector — the case where a row carries the + target's *business key* rather than a foreign key into its `metaFields.id`, + which a table-backed edge cannot express. The traversal is pushed down as a + single `JOIN`, so aggregates across it work and no federated join is + involved. See + [Cross-connector edges](/memgraph-zero/memgql/schema-file#cross-connector-edges). +- **Usage telemetry.** MemGQL sends anonymous usage data to Memgraph: a start + and shutdown record with basic host facts and, every hour, the peak number + of connectors, connections and graphs plus the number of mappings. It never + includes your data, schema, or queries. Start the server with + `--telemetry-enabled=false` to turn it off. See + [Telemetry](/memgraph-zero/memgql/telemetry). + +### ⚠️ Behavior changes + +- **MemGQL listens on every interface by default.** The Bolt listener binds + `0.0.0.0:7688` instead of `127.0.0.1:7688`, matching Memgraph's own + `--bolt-address` default, so a published container port or a Kubernetes + Service reaches it without `BOLT_LISTEN_ADDR`. Anything that can route to + the host can now open a session: set `--bolt-address=127.0.0.1` (or + `BOLT_LISTEN_ADDR=127.0.0.1:7688`) where the server should stay local, and + the `server.listen_addr` row of `SHOW CONFIG` reports what it bound. +- **A label the mapping does not declare now matches nothing.** + `MATCH (p:Person&Vip)` (GQL; `(p:Person:Vip)` in Cypher) on a `Person` table + that does not carry `Vip` returns no rows. Previously the second label was + ignored and every `Person` came back. + +### 🐞 Bug fixes + +- `SHOW STATS CONNECTORS` missed queries that routed by label to a single + connector; only federated and `USE`-qualified queries were counted. + +### 🚧 Known limitations + +- A shared label is unioned within one connector only; shared across + connectors it is refused by routing as ambiguous. A node matched through a + shared label cannot be traversed from, `INSERT`ed, or have JSON keys read + through it — each refusal names the identifying label to use instead. See + [Known limitations](/memgraph-zero/memgql/reference#known-limitations). +- A join edge inside one connector cannot be traversed with a variable-length + step, and both endpoints on a Memgraph or Neo4j connector are refused in + favour of `mappedGraphSource`. + ## MemGQL v0.12.0 - September 14th, 2026 ### ⚠️ Breaking changes diff --git a/pages/memgraph-zero/memgql/complete.mdx b/pages/memgraph-zero/memgql/complete.mdx index d28e3545c..1ba1ab340 100644 --- a/pages/memgraph-zero/memgql/complete.mdx +++ b/pages/memgraph-zero/memgql/complete.mdx @@ -118,14 +118,13 @@ Save the following as `docker-compose.yml`: ```yaml services: memgql: - image: ${MEMGQL_IMAGE:-memgraph/memgql:0.12.0} + image: ${MEMGQL_IMAGE:-memgraph/memgql:0.13.0} container_name: memgql ports: - "7688:7688" environment: CONNECTOR_TYPE: ${CONNECTOR_TYPE:-multi} MEMGRAPH_URI: memgraph:7687 - BOLT_LISTEN_ADDR: 0.0.0.0:7688 # To enable enterprise features, set these in a .env file or via CLI: # MEMGQL_ENTERPRISE_LICENSE=mglk-... # MEMGQL_ORGANIZATION_NAME=your-org @@ -183,7 +182,7 @@ services: - memgql-net lab: - image: memgraph/lab:3.13.1 + image: memgraph/lab:3.13.2 container_name: lab ports: - "3000:3000" @@ -260,7 +259,7 @@ Wait for all containers to become healthy: docker compose ps ``` -You should see all eight services running: `memgraph`, `memgql`, `memgql-init`, +You should see all seven services running: `memgraph`, `memgql`, `memgql-init`, `lab`, `postgres`, `memgql-mcp`, and `structured2graph`. The `memgql-init` container registers both connectors and exits; this is expected. diff --git a/pages/memgraph-zero/memgql/connect/clickhouse.mdx b/pages/memgraph-zero/memgql/connect/clickhouse.mdx index 400cd28b7..b822aaea9 100644 --- a/pages/memgraph-zero/memgql/connect/clickhouse.mdx +++ b/pages/memgraph-zero/memgql/connect/clickhouse.mdx @@ -70,7 +70,6 @@ docker run --rm \ --env CLICKHOUSE_URL=http://clickhouse-dev:8123 \ --env CLICKHOUSE_DB=default \ --env MAPPING_FILE=/data/mapping.json \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./mapping.json:/data/mapping.json \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/connect/duckdb.mdx b/pages/memgraph-zero/memgql/connect/duckdb.mdx index a16a5bb04..e14426c8f 100644 --- a/pages/memgraph-zero/memgql/connect/duckdb.mdx +++ b/pages/memgraph-zero/memgql/connect/duckdb.mdx @@ -45,7 +45,6 @@ docker run --rm \ --env CONNECTOR_TYPE=duckdb \ --env DUCKDB_PATH=/data/graph.duckdb \ --env MAPPING_FILE=/data/mapping.json \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./data:/data \ -v ./mapping.json:/data/mapping.json \ memgraph/memgql:latest diff --git a/pages/memgraph-zero/memgql/connect/fabric.mdx b/pages/memgraph-zero/memgql/connect/fabric.mdx index fd81a4c34..e4e5aaef0 100644 --- a/pages/memgraph-zero/memgql/connect/fabric.mdx +++ b/pages/memgraph-zero/memgql/connect/fabric.mdx @@ -129,7 +129,6 @@ docker run --rm \ --stop-timeout 2 \ -p 7688:7688 \ --env CONNECTOR_TYPE=multi \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./mapping.json:/data/mapping.json \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/connect/hana.mdx b/pages/memgraph-zero/memgql/connect/hana.mdx index fe6768616..050debb2b 100644 --- a/pages/memgraph-zero/memgql/connect/hana.mdx +++ b/pages/memgraph-zero/memgql/connect/hana.mdx @@ -199,7 +199,6 @@ docker run --rm \ --stop-timeout 2 \ -p 7688:7688 \ --env CONNECTOR_TYPE=multi \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./mapping.json:/data/mapping.json \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/connect/iceberg.mdx b/pages/memgraph-zero/memgql/connect/iceberg.mdx index 8240c05ac..cd9eef0d9 100644 --- a/pages/memgraph-zero/memgql/connect/iceberg.mdx +++ b/pages/memgraph-zero/memgql/connect/iceberg.mdx @@ -59,12 +59,12 @@ docker run -d --rm \ -p 9001:9001 \ --env MINIO_ROOT_USER=admin \ --env MINIO_ROOT_PASSWORD=password \ - quay.io/minio/minio server /data --console-address ":9001" + cgr.dev/chainguard/minio server /data --console-address ":9001" -# Create the warehouse bucket. -docker exec minio-dev sh -c \ - "mc alias set local http://localhost:9000 admin password && \ - mc mb --ignore-existing local/warehouse" +# Create the warehouse bucket once MinIO answers. +until curl -sf http://localhost:9000/minio/health/live; do sleep 1; done +curl --aws-sigv4 "aws:amz:us-east-1:s3" --user admin:password \ + -X PUT http://localhost:9000/warehouse # Iceberg REST Catalog backed by MinIO. docker run -d --rm \ @@ -154,7 +154,6 @@ docker run --rm \ --env ICEBERG_DIRECT_S3_ACCESS_KEY_ID=admin \ --env ICEBERG_DIRECT_S3_SECRET_ACCESS_KEY=password \ --env MAPPING_FILE=/data/mapping.json \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./mapping.json:/data/mapping.json \ memgraph/memgql:latest ``` @@ -246,7 +245,6 @@ docker run --rm \ --env TRINO_CATALOG=iceberg \ --env TRINO_SCHEMA=default \ --env MAPPING_FILE=/data/mapping.json \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./mapping.json:/data/mapping.json \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/connect/memgraph.mdx b/pages/memgraph-zero/memgql/connect/memgraph.mdx index 73a1e9b3b..3e7423e5b 100644 --- a/pages/memgraph-zero/memgql/connect/memgraph.mdx +++ b/pages/memgraph-zero/memgql/connect/memgraph.mdx @@ -33,7 +33,6 @@ docker run --rm \ -p 7688:7688 \ --env CONNECTOR_TYPE=memgraph-gql \ --env MEMGRAPH_URI=memgraph-dev:7687 \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/connect/mongodb.mdx b/pages/memgraph-zero/memgql/connect/mongodb.mdx index c3990a954..8bf5b4814 100644 --- a/pages/memgraph-zero/memgql/connect/mongodb.mdx +++ b/pages/memgraph-zero/memgql/connect/mongodb.mdx @@ -128,7 +128,6 @@ docker run --rm \ --env MONGODB_URL=mongodb://mongodb-dev:27017 \ --env MONGODB_DB=test \ --env MAPPING_FILE=/data/mapping.json \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ --mount type=bind,source="$PWD/mapping.json",target=/data/mapping.json,readonly \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/connect/mysql.mdx b/pages/memgraph-zero/memgql/connect/mysql.mdx index aa86b23c3..efad65318 100644 --- a/pages/memgraph-zero/memgql/connect/mysql.mdx +++ b/pages/memgraph-zero/memgql/connect/mysql.mdx @@ -71,7 +71,6 @@ docker run --rm \ --env CONNECTOR_TYPE=mysql \ --env MYSQL_URL="mysql://root:mysql@mysql-dev:3306/test" \ --env MAPPING_FILE=/data/mapping.json \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./mapping.json:/data/mapping.json \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/connect/neo4j.mdx b/pages/memgraph-zero/memgql/connect/neo4j.mdx index d7cd03819..449330e25 100644 --- a/pages/memgraph-zero/memgql/connect/neo4j.mdx +++ b/pages/memgraph-zero/memgql/connect/neo4j.mdx @@ -36,7 +36,6 @@ docker run --rm \ --env NEO4J_URI=neo4j-dev:7687 \ --env NEO4J_USER=neo4j \ --env NEO4J_PASS=password \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/connect/oracle.mdx b/pages/memgraph-zero/memgql/connect/oracle.mdx index 13c128ccc..2ee215b89 100644 --- a/pages/memgraph-zero/memgql/connect/oracle.mdx +++ b/pages/memgraph-zero/memgql/connect/oracle.mdx @@ -92,7 +92,6 @@ docker run --rm \ --env CONNECTOR_TYPE=oracle \ --env ORACLE_URL="oracle://system:oracle@oracle-dev:1521/FREEPDB1" \ --env MAPPING_FILE=/data/mapping.json \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./mapping.json:/data/mapping.json \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/connect/pinot.mdx b/pages/memgraph-zero/memgql/connect/pinot.mdx index a5e209049..bc57565fe 100644 --- a/pages/memgraph-zero/memgql/connect/pinot.mdx +++ b/pages/memgraph-zero/memgql/connect/pinot.mdx @@ -68,7 +68,6 @@ docker run --rm \ --env PINOT_URL=http://pinot-broker-dev:8099 \ --env PINOT_QUERY_OPTIONS=useMultistageEngine=true \ --env MAPPING_FILE=/data/mapping.json \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./mapping.json:/data/mapping.json \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/connect/postgres.mdx b/pages/memgraph-zero/memgql/connect/postgres.mdx index 6e23f14fa..776455417 100644 --- a/pages/memgraph-zero/memgql/connect/postgres.mdx +++ b/pages/memgraph-zero/memgql/connect/postgres.mdx @@ -63,7 +63,6 @@ docker run --rm \ --env CONNECTOR_TYPE=postgres \ --env POSTGRES_URL="host=postgres-dev user=postgres password=postgres dbname=postgres" \ --env MAPPING_FILE=/data/mapping.json \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./mapping.json:/data/mapping.json \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/connect/snowflake.mdx b/pages/memgraph-zero/memgql/connect/snowflake.mdx index 38ad52283..eafe6129c 100644 --- a/pages/memgraph-zero/memgql/connect/snowflake.mdx +++ b/pages/memgraph-zero/memgql/connect/snowflake.mdx @@ -134,7 +134,6 @@ docker run --rm \ --stop-timeout 2 \ -p 7688:7688 \ --env CONNECTOR_TYPE=multi \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./mapping.json:/data/mapping.json \ -v ./rsa_key.p8:/data/rsa_key.p8 \ memgraph/memgql:latest diff --git a/pages/memgraph-zero/memgql/connect/sqlserver.mdx b/pages/memgraph-zero/memgql/connect/sqlserver.mdx index 0e3cc2382..7749c0e51 100644 --- a/pages/memgraph-zero/memgql/connect/sqlserver.mdx +++ b/pages/memgraph-zero/memgql/connect/sqlserver.mdx @@ -165,7 +165,6 @@ docker run --rm \ --stop-timeout 2 \ -p 7688:7688 \ --env CONNECTOR_TYPE=multi \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v ./mapping.json:/data/mapping.json \ memgraph/memgql:latest ``` diff --git a/pages/memgraph-zero/memgql/licensing.mdx b/pages/memgraph-zero/memgql/licensing.mdx index 03463811c..27e360da2 100644 --- a/pages/memgraph-zero/memgql/licensing.mdx +++ b/pages/memgraph-zero/memgql/licensing.mdx @@ -48,6 +48,7 @@ MemGQL is built with the following open-source libraries: | [neo4rs](https://crates.io/crates/neo4rs) | Neo4j/Memgraph Bolt protocol driver | MIT | | [oracle-rs](https://crates.io/crates/oracle-rs) | Pure-Rust Oracle TNS protocol driver | MIT / Apache-2.0 | | [parquet](https://crates.io/crates/parquet) | Apache Parquet columnar file format | Apache-2.0 | +| [redb](https://crates.io/crates/redb) | Embedded key-value store (telemetry buffer) | MIT / Apache-2.0 | | [postgres](https://crates.io/crates/postgres) | PostgreSQL synchronous client | MIT / Apache-2.0 | | [reqwest](https://crates.io/crates/reqwest) | HTTP client | MIT / Apache-2.0 | | [rust_decimal](https://crates.io/crates/rust_decimal) | Fixed-precision decimal numbers | MIT | diff --git a/pages/memgraph-zero/memgql/quick-start.mdx b/pages/memgraph-zero/memgql/quick-start.mdx index 41d41f6cf..ec61cd038 100644 --- a/pages/memgraph-zero/memgql/quick-start.mdx +++ b/pages/memgraph-zero/memgql/quick-start.mdx @@ -43,7 +43,6 @@ docker run --rm \ -p 7688:7688 \ --env CONNECTOR_TYPE=memgraph-gql \ --env MEMGRAPH_URI=memgraph-dev:7687 \ - --env BOLT_LISTEN_ADDR=0.0.0.0:7688 \ memgraph/memgql:latest ``` @@ -290,7 +289,6 @@ stop the MemGQL container you started earlier (Ctrl-C) to free port 7688: ```bash docker run --rm -p 7688:7688 \ --network memgql-net \ - -e BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v "$(pwd)/schema.json:/data/schema.json" \ memgraph/memgql:latest --schema=/data/schema.json ``` diff --git a/pages/memgraph-zero/memgql/reference.mdx b/pages/memgraph-zero/memgql/reference.mdx index 9eb7c9f6a..a508aee46 100644 --- a/pages/memgraph-zero/memgql/reference.mdx +++ b/pages/memgraph-zero/memgql/reference.mdx @@ -25,6 +25,7 @@ supports. | Multiple chained `WITH` steps in one query | ✓ | ✓ | ✓ | | Pass a whole node through `WITH n` to a later step | ✓ | ✓ | ✓ | | `MATCH (n)-[r:R]->(m)` typed edge expansion | ✓ | ✓ | ✓ | +| Multi-label pattern `(n:A&B)`; shared label over several mappings | ✓ | ✓ | ✗ | | Untyped edge `()-[]->(b)` (union over types) | ✓ | ✗ | ✗ | | `UNION` / `UNION ALL` / `UNION DISTINCT` | ✓ | ✓ | ✗ | | `INTERSECT` / `EXCEPT` | ✓ | ✓ | ✗ | @@ -73,6 +74,13 @@ supports. `MATCH p = (a){1,3}(b) RETURN p` is not yet supported on SQL backends or MongoDB. Drop the `p =` binding (or query a Cypher backend) and `RETURN` the individual nodes / edges instead. +- **Shared labels** (a label listed by several vertex mappings, see + [Vertices](/memgraph-zero/memgql/schema-file#vertices)) are unioned only + within one connector; a label shared across connectors is refused by routing + as ambiguous. A pattern matched through a shared label can be returned, + filtered, sorted and aggregated, but not traversed from (`(a:Animal)-[:R]->()`), + not `INSERT`ed, and JSON keys (`a.props.key`) cannot be read through it — + each is refused with a pointer to the identifying label to use instead. #### MongoDB-specific @@ -407,7 +415,7 @@ for property-level introspection. See |---------------------------|------------------|-------------------------------------------------------------------| | `CONNECTOR_TYPE` | `memgraph` | Connector to use (see table below) | | `CONNECTION_TYPE` | _(none)_ | Alias for `CONNECTOR_TYPE` | -| `BOLT_LISTEN_ADDR` | `127.0.0.1:7688` | Address the Bolt server binds to | +| `BOLT_LISTEN_ADDR` | `0.0.0.0:7688` | `:` the Bolt listener binds — every interface by default, as in Memgraph. Use `127.0.0.1:7688` to accept only connections from the same host. An IP, not a hostname; IPv6 in brackets (`[::]:7688`). `--bolt-address` / `--bolt-port` override it. | | `MEMGQL_DEFAULT_LANGUAGE` | `gql` | [Query language](/memgraph-zero/memgql/reference#query-languages) for bare (unprefixed) queries | ### Logging @@ -421,6 +429,8 @@ CLI flags on the Bolt server binary. | Flag | Default | Description | |----------------------------|--------------------|------------------------------------------------------| +| `--bolt-address=` | `0.0.0.0` | Interface the Bolt listener binds; `127.0.0.1` refuses connections from other hosts. An IP, not a hostname; IPv6 bare (`::`). | +| `--bolt-port=` | `7688` | Port the Bolt listener binds (`--bolt-server=` is a synonym). Each flag replaces only its half of `BOLT_LISTEN_ADDR`. | | `--log-level=` | `INFO` | Logging verbosity for console and file (see below) | | `--log-file=` | `bolt_server.log` | File to mirror the (level-filtered) log output to | | `--default-language=` | `gql` | [Query language](/memgraph-zero/memgql/reference#query-languages) for bare queries (`gql` / `cypher`) | diff --git a/pages/memgraph-zero/memgql/schema-file.mdx b/pages/memgraph-zero/memgql/schema-file.mdx index e5a8d7903..f46495e8e 100644 --- a/pages/memgraph-zero/memgql/schema-file.mdx +++ b/pages/memgraph-zero/memgql/schema-file.mdx @@ -22,15 +22,17 @@ Run MemGQL in Docker: mount the schema file and pass its container path. ```bash docker run --rm -p 7688:7688 \ - -e BOLT_LISTEN_ADDR=0.0.0.0:7688 \ -v "$(pwd)/schema.json:/data/schema.json" \ memgraph/memgql:latest --schema=/data/schema.json ``` `--schema` (or the `SCHEMA_FILE` env var) is all you need; it implies -multi-connector mode. Set `BOLT_LISTEN_ADDR=0.0.0.0:7688` so the Bolt port is -reachable from outside the container (the default binds loopback only), and run -MemGQL on the same Docker network as the backends its connectors reference. +multi-connector mode. MemGQL listens on `0.0.0.0:7688` by default — every +interface, as Memgraph does — so the published port reaches it without further +configuration. To accept local connections only, set +`BOLT_LISTEN_ADDR=127.0.0.1:7688` or pass `--bolt-address=127.0.0.1` (see +[Configuration](/memgraph-zero/memgql/reference#configuration-reference)). +Run MemGQL on the same Docker network as the backends its connectors reference. Every connector connects and every graph registers at boot, so no `CONNECT` or `USE` is required to start querying. Runtime DDL writes the updated catalog back @@ -245,8 +247,40 @@ A vertex maps a **label** to a backend source. Exactly one source kind is set: } ``` +A table whose rows should carry **more than one label** lists them under +`labels` instead of `label`. The first label identifies the mapping and must be +unique in the graph; the others may be shared with other mappings: + +```json +{ + "labels": ["Cat", "Animal"], + "mappedTableSource": { + "connector": "pg", + "table": "cats", + "metaFields": { "id": "cat_id" } + }, + "attributes": [ + { "name": "id", "column": "cat_id" }, + { "name": "name" } + ] +} +``` + +With a second mapping `["Dog", "Animal"]` over a `dogs` table keyed by +`dog_id`, `MATCH (a:Cat)` reads one table, `MATCH (a:Dog&Animal)` the other +(GQL writes a label conjunction as `:A&B`; in Cypher it is `:Dog:Animal`), +and `MATCH (a:Animal)` both — as one `UNION` statement inside the connector. +Shared property names resolve through each table's own columns, a property +only one table declares is `null` on the other's rows, and returned nodes +carry all of their labels (`(:Cat:Animal)`). Attributes that two carriers of a shared +label both declare must have the same `type`. A traversal or an `INSERT` has to +start from one table, so on a shared label both are refused with a pointer to +the identifying label. A label no mapping carries together with the others +matches nothing. + | Field | Source kind | Description | |-------|-------------|-------------| +| `label` / `labels` | both | The node label, or a list of labels whose first entry identifies the mapping (unique per graph) and whose others may be shared with other mappings. | | `mappedTableSource.connector` | relational | Connector name (alias `catalog`). | | `mappedTableSource.schema` | relational | Optional middle namespace (PostgreSQL schema, etc.). | | `mappedTableSource.database` | relational | Optional outer namespace for backends with three-part names; on SQL Server it renders `database.schema.table`, so one connection can reach views in other databases. | @@ -258,9 +292,12 @@ A vertex maps a **label** to a backend source. Exactly one source kind is set: An edge maps a **relationship type** between two labels. Relational edges name the foreign-key columns via `metaFields.from` / `metaFields.to`; native-graph -edges pass through; and a `mappedJoinSource` edge links two labels that live in -**different connectors** (see [Cross-connector edges](#cross-connector-edges)). -Exactly one source kind is set. +edges pass through; and a `mappedJoinSource` edge has no table at all — it +links two labels by the equality of one property on each side, whether they +live in **different connectors** or in the same one (see +[Cross-connector edges](#cross-connector-edges)). Exactly one source kind is +set. An edge's `from` / `to` name a vertex by its identifying label (the first +entry of a `labels` list). ```json { @@ -318,9 +355,11 @@ labels; the traversal is resolved by the backend. #### Cross-connector edges -A third source kind, `mappedJoinSource`, declares an edge whose two endpoints -live in **different connectors**. It has no backing table anywhere: the -relationship *is* equality between one property on each endpoint. +A third source kind, `mappedJoinSource`, declares an edge with **no backing +table anywhere**: the relationship *is* equality between one property on each +endpoint. It is how a traversal crosses into a **different connector**, and +also how two tables in the **same** connector are linked by a business key +rather than by a foreign key into the target's `metaFields.id`. ```json { @@ -361,19 +400,22 @@ don't collide. **Rules and limits** (each is refused with a message saying what to write instead): -- Both endpoints must live in different connectors — within one connector use - `mappedTableSource` with `metaFields.from` / `to`. -- Each key must be a declared `attribute` of its endpoint vertex (native-graph - vertices are exempt, since the query passes through). -- The edge must be traversed **in a direction**: `-[:R]->` or `<-[:R]-`, not - `-[:R]-`. -- No variable-length traversal, no `OPTIONAL MATCH`, and one `MATCH` with one - path pattern per query. +- Each key must be a declared `attribute` of its endpoint vertex, backed by a + plain scalar column (native-graph vertices are exempt, since the query passes + through). The edge declares no `attributes`. - The edge carries no properties, so it cannot be filtered — filter the endpoints instead. -- Every node in the pattern needs a label, so each side can be routed. -- Aggregating *across* the join (for example `count()` over both sides) is not - supported yet; return the rows and count client-side. +- Across connectors: the edge must be traversed **in a direction** (`-[:R]->` + or `<-[:R]-`, not `-[:R]-`); no variable-length traversal, no + `OPTIONAL MATCH`, one `MATCH` with one path pattern per query; every node in + the pattern needs a label, so each side can be routed; aggregating *across* + the join (`count()` over both sides) is not supported yet. +- Within one relational connector the edge is pushed down as a single `JOIN` + on the two key columns, so those limits do not apply: aggregates work, and an + undirected step is accepted when the two endpoint labels differ. A + variable-length step over it is refused. Both endpoints on a Memgraph or + Neo4j connector are refused — that backend stores its own relationships, so + declare `mappedGraphSource`. A **table-backed** edge whose endpoints sit in different connectors is still skipped at load time with a warning pointing at `mappedJoinSource`. diff --git a/pages/memgraph-zero/memgql/telemetry.mdx b/pages/memgraph-zero/memgql/telemetry.mdx new file mode 100644 index 000000000..312f49182 --- /dev/null +++ b/pages/memgraph-zero/memgql/telemetry.mdx @@ -0,0 +1,39 @@ +--- +title: Telemetry +description: What MemGQL reports back to Memgraph and how to turn it off. +--- + +# Telemetry + +MemGQL sends **anonymous, statistical** usage data to Memgraph. It never +includes your data, schema, queries, credentials, or connection strings, and +it is not tied to a user or an account. + +`SHOW CONFIG;` reports the setting as `telemetry.enabled`. + +## What is sent + +This is the complete list. + +- **With every record:** product name (`memgql`), event type (`start`, + `periodic` or `shutdown`), timestamp, MemGQL version, a random install id, a + random run id, and the record's sequence number within the run. The ids are + random, so they only tell servers apart. +- **At start:** license mode (community or enterprise), connector mode, and + host facts: hostname, operating system type and description (e.g. `linux`, + `Ubuntu 24.04`), CPU architecture, CPU core count, total memory, and whether + it runs in a container. +- **Every hour:** uptime, the peak number of connectors, connections, and + graphs since start, and the number of node and edge mappings registered. +- **At shutdown:** the same facts as at start, plus uptime. + +## Disable it + +If required, it's possible to disable sending statistical data by starting the +server with the flag: +```bash +docker run --rm -p 7688:7688 memgraph/memgql:latest --telemetry-enabled=false +``` + +If Memgraph's telemetry server is unreachable, records are kept in a local +`memgql_telemetry.redb` file next to the server and sent later. diff --git a/pages/memgraph-zero/memgql/use-cases/public-private.mdx b/pages/memgraph-zero/memgql/use-cases/public-private.mdx index 839322529..90d1d838a 100644 --- a/pages/memgraph-zero/memgql/use-cases/public-private.mdx +++ b/pages/memgraph-zero/memgql/use-cases/public-private.mdx @@ -62,13 +62,12 @@ MemGQL, and a one-shot init container: cat > docker-compose.yml << 'EOF' services: memgql: - image: ${MEMGQL_IMAGE:-memgraph/memgql:0.12.0} + image: ${MEMGQL_IMAGE:-memgraph/memgql:0.13.0} ports: - "7688:7688" environment: CONNECTOR_TYPE: multi MEMGRAPH_URI: memgraph:7687 - BOLT_LISTEN_ADDR: 0.0.0.0:7688 volumes: - ./pg_mapping.json:/mappings/pg_mapping.json:ro depends_on: