Dgraph

Dgraph is fully open-source, built-for-scale graph database for Gen AI workloads

About

Dgraph is an open-source graph database. It is designed for real-time workloads, horizontal scalability, and data flexibility. Implemented as a distributed system, Dgraph processes queries in parallel to deliver the fastest result.

This source can connect to either a self-managed Dgraph cluster or one hosted on Dgraph Cloud. If you’re new to Dgraph, the fastest way to get started is to sign up for Dgraph Cloud.

Available Tools

  • dgraph-dql
    Run DQL (Dgraph Query Language) queries.

Requirements

Database User

When connecting to a hosted Dgraph database, this source uses the API key for access. If you are using a dedicated environment, you will additionally need the namespace and user credentials for that namespace.

For connecting to a local or self-hosted Dgraph database, use the namespace and user credentials for that namespace.

Example

sources:
    my-dgraph-source:
        kind: dgraph
        dgraphUrl: https://xxxx.cloud.dgraph.io
        user: ${USER_NAME}
        password: ${PASSWORD}
        apiKey: ${API_KEY}
        namespace : 0

Tip

Use environment variable replacement with the format ${ENV_NAME} instead of hardcoding your secrets into the configuration file.

Reference

FieldTypeRequiredDescription
kindstringtrueMust be “dgraph”.
dgraphUrlstringtrueConnection URI (e.g. “https://xxx.cloud.dgraph.io”, “https://localhost:8080”).
userstringfalseName of the Dgraph user to connect as (e.g., “groot”).
passwordstringfalsePassword of the Dgraph user (e.g., “password”).
apiKeystringfalseAPI key to connect to a Dgraph Cloud instance.
namespaceuint64falseDgraph namespace (not required for Dgraph Cloud Shared Clusters).