You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: