# MS SQL Server
Through the MS SQL Server (opens new window) connector, Ontop is able to construct VKGs on SQL Server databases.
# Limitations & Exceptions
- RegEx SPARQL functions are not supported.
- The
position
argument for the Flatten Lens cannot be used with SQLServer. - Support for
DATETRUNC
in SQL Server is very recent (introduced in SQL Server 2022)
# Database Connection
The following shows the content of a sample .properties
file that can be used to connect Ontop to SQLServer:
jdbc.url = jdbc:sqlserver://localhost:1433;databaseName=defaultdatabase
jdbc.user = user
jdbc.password = password
jdbc.driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
# Nested Type Support
Nested data types are not supported by SQLServer. However, Ontop allows the usage of the flatten lens over string columns that contain JSON-encoded arrays. The output type of the flattened result column cannot be inferred.
WARNING
The position
argument for flatten lenses cannot be used with SQLServer.
In case the flattened column is still a nested structure after the flatten operation is performed (e.g. for arrays of objects), SQLServer's JSON functions (opens new window) can be used to further work with them.