Microsoft SQL Server

Microsoft SQL Server

The SQL Server integration synchronizes metadata from your SQL Server databases into the data lineage graph.

Web App

SQL Server Integration


sourceThe name of the source, see sourcesmy-source
NameName for connectionMicrosoft SQL Server
NamespaceNamespace for the connection, see namespacesdefault
portDatabase port5432
databaseDatabase namejaffle_shop
userDatabase user
passwordDatabase password

Your database will need to be accessible from wherever you are running the Grai server. If you are using Grai Cloud your database will need to be accessible from the internet.

Python Library


You'll need to first install the ODBC drivers for SQL Server before installing the SQL Server integration.


If you're on a mac these can be installed with brew install unixodbc. If you're using Apple Silicon and encounter any issues running or installing the drivers we have some additional support documentation here (opens in a new tab)

pip install grai_source_mssql

More information about the API is available here.


The library is split into a few distinct functions but if you only wish to extract nodes/edges you can do so as follows:

  from grai_source_mssql import MsSQLIntegration
  from grai_schemas.v1.source import SourceV1
  source = SourceV1(name="my-source", type="my-type")
  mssql_params = {
    "username": "my-username",
    "password": "my-password",
    "host": "my-mssql-hostname",
  integration = MsSQLIntegration(source=source, namespace="mssql", **mssql_params)
  nodes, edges = integration.get_nodes_and_edges()

There are other option parameters like database, protocol, and port which are also available. More detail about ODBC connection string arguments are available from Microsoft (opens in a new tab)