Open arrascue opened 1 year ago
I have created an instance of a Microsoft SQL database with the same table name and schema and I can confirm the mapping and JDBC properties work and I can create an endpoint. It must be something specific to Azure Data Explorer.
If I execute SELECT SCHEMA_ID();
on the Microsoft SQL database then this returns a result, while on ADX I get:
Request is invalid and cannot be processed: Semantic error: OTR0001: Scalar SQL function 'SCHEMA_ID' is not supported. [line:position=1:8]
Hi @arrascue, thanks for reporting this compatibility issue with Azure Data Explorer.
Let's hope support for this function will be added on the Microsoft side.
Description
I am using Ontop to create a virtual graph on top of Azure Data Explorer (ADX), which supports the MS JDBC Driver:
My connection properties are the following:
My mapping looks as follows:
Problem
If I run
$ONTOP_CLI_DIR/ontop validate"
on the properties, mappings and ontology, I get the following error:The problem seems to be in the SQL part of the mapping:
SELECT DeviceID FROM DeviceEvents
. The message suggests alternatives (like ["events"."dbo"."DeviceEvents"]). Indeed, I can run a query likeSELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' OR TABLE_TYPE='VIEW'
which returns:TABLE_CATALOG: events, TABLE_SCHEMA: dbo, TABLE_NAME: DeviceEvents
Therefore, I assume the authentication is not a problem, since it can fetch this type of metadata. I have tried many variants of writing that SQL statement such as:
Those variations result into a slightly different error:
I found this article for another type of database which points to a similar problem for another database technology: https://github.com/ontop/ontop/issues/462
Can I then conclude this is a problem with the particular SQL dialect?