Virtual Graph Connection

Hi,
I'm getting the following error when trying to create a Virtual Graph:

Here are the steps i've taken to configure my environment.
I guess you would be interested in steps 9 to 13.
In step 13, i wasn't sure about how to create and where to save it.
Any help really appreciated.
Stardog Studio 1.19
Server Version 7.2
Thanks very much,

  1. Installed Docker Desktop on Macbook Pro

  2. Downloaded Stardog Docker Image from the following location:
    Get Started with Stardog - Get Started Page | Stardog

  3. Added the following databases to the image above:
    • GettingStarted_Music_Data
    • stardog-tutorial-beatles
    • stardog-tutorial-music
    • Northwind (a Microsoft sample database)

  4. Pushed changes to the following image:
    Docker

  5. Set up MS SQL Server on Linux, including all MS sample databases, and pushed changes to the following image:
    Docker
    Image description:
    It contains the following MS Sample Databases: WideWorldImporters, AdventureWorks2017, and a revised version of Northwind. You can connect to the server using Azure Data Studio. Use Connection Type "Microsoft SQL Server", Server ".", Authentication Type "SQL Login", User Name "SA", Password "*********", and Database "Master".

  6. Ran both, MS SQL Server and Stardog containers on Macbook Pro

  7. Installed Azure Data Studio on Macbook Pro and connected to MS SQL Server container successfully.

  8. Installed Stardog Studio on Macbook and connected to the container server successfully.

  9. Check JDBC driver compatibility
    Support matrix - JDBC Driver for SQL Server | Microsoft Learn
    Stardog is running JRE version 18, so driver must be version 7.0 or above.

  10. Download JDBC driver version 8.2 (latest available)
    Download - JDBC Driver for SQL Server | Microsoft Learn

  11. Set up STARDOG_EXT environment inside the docker container, as per instructions in the link below:
    https://www.stardog.com/tutorials/using-virtual-graphs/
    docker exec -u root -t -i container_id /bin/bash (requires space after container¬¬_id)
    export STARDOG_EXT=/opt/stardog/ext
    mkdir $STARDOG_EXT

  12. Copy Sql Server JDBC driver (jar) to STARDOG_EXT location
    In my case, the driver downloaded from MS in step 10, named mssql-jdbc-8.2.2.jre13.jar
    cd Downloads/sqljdbc_8.2\enu
    docker cp 'mssql-jdbc-8.2.2.jre13.jar' 'ContainerID:/opt/stardog/ext'
    Note: Must restart the Stardog Server
    ALSO TRIED DRIVER FROM STARDOG DOCUMENTATION: mssql-jdbc-6.2.1.jre8.jar

  13. Properties File

Location: /var/opt/stardog/data (I wasn’t sure where to copy this file!)
Name: mssql.properties (I wasn’t sure what to name this file!)
Contents:
jdbc.url=jdbc:sqlserver://localhost;databaseName=Northwind;
jdbc.username=SA
jdbc.password=***************
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver

docker cp ' mssql.properties' 'ContainerID:/var/opt/stardog/data'

Create Virtual Graph window:
JDBC Connection URL: jdbc:sqlserver://localhost;databaseName=Northwind;user=SA;password=Monday*1;
JDBC User Name: SA
JDBC Password:*******
JDBC Driver Class: om.microsoft.sqlserver.jdbc.SQLServerDriver

Welcome to the forum Marcelo. Thanks for the detailed description of the problem! I'm guessing STARDOG_EXT isn't seen by the actual running Stardog process. Let me ask around for how to remedy this.

1 Like

Marcelo,

There are two options here:

  • Pass the environment variable on the command line to docker, eg -e "STARDOG_EXT=/opt/stardog/ext"
  • Include the JDBC driver jar in the Docker image you've built. This is our recommendation for production deployments

Let us know how it goes.
Jess

1 Like

Thanks very much! Setting the environment in the docker run command worked for me.

Just one more thing. It may sound obvious, but... Are Virtual Graphs read-only? Thanks again.

You are correct that virtual-graphs are read only

Thanks very much. Virtual-graph are very useful.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.