Link Search Menu Expand Document
Start for Free

Configuring the BI Server

This page discusses administering Stardog’s Business Intelligence (BI) Server. For more information on the BI Server’s supported clients and their usage, please see the section on BI Tools and SQL Queries.

Page Contents

Introduction

Stardog provides a facility to bridge the flexible schema of the graph data model to the traditional relational model required by business intelligence tools that use SQL. This enables seamless use of business intelligence and visualization tools such as Tableau and Power BI.

Using this feature requires creating a schema mapping from Stardog’s data model to a relational data model. This mapping will be used to generate a relational schema. After creating the schema, the full power of SQL becomes available to relational clients.

Authentication requirements dictate that users created in versions of Stardog prior to 7.0.2 will need to have their password reset before connecting through the BI server. This requirement is not applicable if LDAP authentication is configured.

Configuration Details

To integrate with business intelligence applications, Stardog includes a BI Server that makes Stardog communicate like a fully SQL-compliant RDBMS. The BI Server can be configured to run inside Stardog using the following configuration options in stardog.properties:

Property Description
sql.server.enabled Turns on the BI Server. Must be set to true to use this feature.
sql.server.port Controls the TCP port which the SQL query endpoint listens on. The default port is 5806.
sql.server.commit.invalidates.schema Controls when changes to the schema mappings are visible to new BI connections. The default value is true. If true, changes to the schema mappings will be visible to newly created connections. This can lead to unnecessary load if the mappings rarely change. If false, changes to the schema mappings will only affect the schema after the database is taken offline. In all cases, users with long running connections will not see schema changes until they reconnect.

The schema mapping is stored in a named graph that can be configured separately for each database. The sql.schema.graph database option should be set to the IRI of the named graph that stores the schema. The default value is tag:stardog:api:sql:schema.

If the schema mapping is not manually added by the user and the database configuration option sql.schema.auto is set to true (the default value), a schema mapping will be automatically created and used. Read more about this in the BI Tools and SQL Queries section.

LDAP Authentication in BI Server

The BI Server uses the same authentication mechanisms configured globally in the Stardog instance. This is generally transparent but may require special configuration in the MySQL client. MySQL’s ODBC driver requires “cleartext” password authentication to be enabled when using LDAP authentication. This can be done by setting ENABLE_CLEARTEXT_PLUGIN=1 when editing the DSN file or by checking the “Enable Cleartext Authentication” option of the “Connection” tab in the GUI configuration.

SSL Connections to BI Server

The BI Server supports SSL/TLS connections, which is especially important when sending cleartext passwords with LDAP authentication as described above. The required configuration is to provide a server key as documented in Configuring Stardog to use SSL. The BI Server currently only reads the SSL/TLS keyStore property from the JVM arguments, not from stardog.properties.

When the server key is provided, the BI Server will advertise SSL/TLS capability to clients. Preventing the use of unencrypted connections can be done on the client side. MySQL’s ODBC driver can be configured with SSLMODE=REQUIRED. MySQL’s JDBC driver can be configured with requireSSL=true or sslMode=REQUIRED.

Debugging BI Server Queries

To see the SPARQL queries generated by the BI server, add this element to the <Loggers> section of your log4j2.xml file and restart Stardog:

<Logger name="com.complexible.stardog.serf.sql.planner.SparqlEnumerator" level="DEBUG" additivity="false">
    <AppenderRef ref="stardogAppender"/>
</Logger>

See the Logging section in the Server Administration chapter for more information on configuring your log4j2.xml file.