-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
data modeling:tesseractdriver:mssqlIssues relating to the MSSQL driverIssues relating to the MSSQL driver
Description
Describe the bug
While experimenting with Tesseract engine with MSSQL database, I have noted that the queries being generated do not follow T-SQL dialect but are generating PostgreSQL-ish dialect queries
To Reproduce
Steps to reproduce the behavior:
- Start cube.dev with a test data model
- Select a column to query and check the generated SQL. The generated SQL is following T-SQL dialect and runs fine.
- Enable Tesseract engine by setting the env variable true and restart cube.dev
- Select a column to query and check the generated SQL. The generated SQL is following postgresql dialect and fails to run on mssql.
Expected behavior
Tesseract should generate SQL based on the dialect of the underlying DBMS just as cube.dev generates queries based on the DBMS dialect when Tesseract is not being used.
Screenshots
Without Tesseract:
With Tesseract:
Minimally reproducible Cube Schema
In case your bug report is data modelling related please put your minimally reproducible Cube Schema here.
You can use selects without tables in order to achieve that as follows.
cube(`TestModel`, {
sql: `
select 'Europe' as Continent, 'Germany' as Country
UNION ALL
select 'Europe' as Continent, 'France' as Country
UNION ALL
select 'Europe' as Continent, 'Norway' as Country
UNION ALL
select 'Asia' as Continent, 'China' as Country
UNION ALL
select 'Asia' as Continent, 'Singapore' as Country
`,
measures: {
count: {
type: `count`,
},
},
dimensions: {
continent: {
sql: `Continent`,
type: `string`,
},
country: {
sql: `Country`,
type: `string`,
},
},
});Version:
1.3.14
Additional context
N/A
Metadata
Metadata
Assignees
Labels
data modeling:tesseractdriver:mssqlIssues relating to the MSSQL driverIssues relating to the MSSQL driver

