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

SQL Model Blueprinting bug? #4017

Open
kylelundstedt opened this issue Mar 20, 2025 · 0 comments
Open

SQL Model Blueprinting bug? #4017

kylelundstedt opened this issue Mar 20, 2025 · 0 comments
Assignees
Labels
Bug Something isn't working

Comments

@kylelundstedt
Copy link

Hi all,

This issue references a discussion in the Tobiko Slack. @izeigerman and @georgesittas were super helpful in getting me up to speed on using the new SQL model blueprinting features. This new feature has already reduced my lines of code by an order of magnitude; so cool!

However, I did run into a couple of issues for which @georgesittas suggested I open an issue. So, I've attached a zipped sqlmesh project folder that tries to illustrate the two problems.

First, as shown in models/test_1.sql, in the list of table names in the blueprints section of the model definition, the table in line 7 includes spaces in the table name, and the table in line 8 uses a reserved word in SQL (e.g., "transaction").

I've tried putting single quotes and double quotes around those table names, but to no avail. I get errors like the following:

'name' property cannot be a string value: raw."my table space". Please use the identifier syntax instead, e.g. foo.bar instead of 'foo.bar'. Line 2, Col: 28.

Second, as shown in models/test_2.sql, in the list of table names in the blueprints section of the model definition, one of the variables includes values with a colon - e.g., range_value := "A1:B4" in line 5.

In this case, sqlmesh throws the following error:
a BinderException: Binder Error: Invalid range ''J1:M3261''
Again, I tried both single and double quotes to no avail.

Hopefully, the attached example (using just sqlmesh and DuckDB) is enough to reproduce the problems.

sqlmesh_bug.zip

@georgesittas georgesittas self-assigned this Mar 25, 2025
@izeigerman izeigerman added the Bug Something isn't working label Mar 26, 2025
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