Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSSQL parsing does not handle default schema #316

Closed
QuantumPlumber opened this issue Oct 20, 2023 · 4 comments
Closed

MSSQL parsing does not handle default schema #316

QuantumPlumber opened this issue Oct 20, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@QuantumPlumber
Copy link

We observe a silent error when database and namespace are used in the FROM component of a CREATE MODEL statement like this:

CREATE MODEL mindsdb.house_sales_model FROM mssql_datasource(SELECT * FROM mssql_datasource.dbo.house_sales) PREDICT price_moving_average ORDER BY sale_date GROUP BY bedrooms, building_type WINDOW 12 HORIZON 3 USING ENGINE = 'statsforecast';

Where the mssql_datasource is a connection to the MSSQL MindsDB test server.

One potential customer reports that model training hangs and never returns with the above syntax.

We have not recreated the hanging training, but we have verified that the above syntax does throw a server error that requests the user to inspect the server error logs (the error is opaque).

Additionally, we have observed that public in postgres throws a good verbose error.

@QuantumPlumber QuantumPlumber added the bug Something isn't working label Oct 20, 2023
@ea-rus
Copy link
Contributor

ea-rus commented Oct 23, 2023

Just in case: In this syntax query in brackets is the raw query to database and should be without mindsdb datasource name: SELECT * FROM dbo.house_sales

CREATE MODEL  mindsdb.house_sales_model 
FROM mssql_datasource(SELECT * FROM dbo.house_sales)
PREDICT price_moving_average
ORDER BY sale_date 
GROUP BY bedrooms, building_type
WINDOW 12 
HORIZON 3 
USING ENGINE = 'statsforecast'; 

@tomhuds
Copy link
Contributor

tomhuds commented Oct 24, 2023

Sounds like we should catch this syntax error, instead of allowing the model to be stuck on generating indefinitely

@ea-rus
Copy link
Contributor

ea-rus commented Oct 24, 2023

I can't replicate hanging, checked on alpha and cloud: in both cases this query:

CREATE MODEL  mindsdb.house_sales_model
 FROM mssql_datasource(SELECT * FROM mssql_datasource.dbo.house_sales) 
PREDICT price_moving_average 
ORDER BY sale_date 
GROUP BY bedrooms, building_type 
WINDOW 12 HORIZON 3 
USING ENGINE = 'statsforecast'; 

returns error from mssql database:
image

@tomhuds
Copy link
Contributor

tomhuds commented Oct 24, 2023

sweet, closing

@tomhuds tomhuds closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants