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
First of all, thanks for tackling this integration. This is huge!
--
I'm trying it out with our sqlmesh project and it fails due to some of our (external) models having unusual naming.
The external model is actually a set of tables named:
analytics_12345.events_20240925
analytics_12345.events_20240926
...
So far, nothing unusual here, but to facilitate local development we mock these tables as a single table in duckdb. And to make our external-model schema work in both cases (multiple tables in bigquery vs a single table in duckdb), we declare it as:
(The table in duckdb actually contains an * in its name, and not as a wildcard.)
That's when things get messy (we also had trouble with sqlmesh initially, but it now supports these).
In short, our external models contain backticks, stars and quotes (when normalized by sqlmesh).
I've checked that replacing these extra characters makes our project load just fine. I'm happy to contribute a patch, but first would like to know how you'd want these handled. Just naively adding more string replacements to sqlmesh_model_name_to_key and key_to_sqlmesh_model_name seems like a recipe for disaster.
--
Error message:
dagster._core.errors.DagsterInvalidDefinitionError: "analytics_12345_dot__`events_*`" is not a valid name in Dagster. Names must be in regex ^[A-Za-z0-9_]+$.
The text was updated successfully, but these errors were encountered:
giovannipcarvalho
changed the title
Project fails to load when models have names containing backticks, asterisk or quotes
Project fails to load when models names contain backticks, asterisk or quotes
Sep 25, 2024
giovannipcarvalho
changed the title
Project fails to load when models names contain backticks, asterisk or quotes
Project fails to load when model names contain backticks, asterisk or quotes
Sep 25, 2024
@giovannipcarvalho apologies for a very delayed response! I've been so heads down writing things around our own sqlmesh configuration that I didn't notice my notification for an issue on this repository. This is definitely an interestiong problem! I'll have to ponder this one.
First of all, thanks for tackling this integration. This is huge!
--
I'm trying it out with our sqlmesh project and it fails due to some of our (external) models having unusual naming.
The external model is actually a set of tables named:
analytics_12345.events_20240925
analytics_12345.events_20240926
So far, nothing unusual here, but to facilitate local development we mock these tables as a single table in duckdb. And to make our external-model schema work in both cases (multiple tables in bigquery vs a single table in duckdb), we declare it as:
(The table in duckdb actually contains an
*
in its name, and not as a wildcard.)That's when things get messy (we also had trouble with sqlmesh initially, but it now supports these).
In short, our external models contain backticks, stars and quotes (when normalized by sqlmesh).
I've checked that replacing these extra characters makes our project load just fine. I'm happy to contribute a patch, but first would like to know how you'd want these handled. Just naively adding more string replacements to
sqlmesh_model_name_to_key
andkey_to_sqlmesh_model_name
seems like a recipe for disaster.--
Error message:
The text was updated successfully, but these errors were encountered: