@@ -45,6 +45,8 @@ class SQLMeshRunConfig(dg.Config):
4545 start : str | None = None
4646 end : str | None = None
4747
48+ use_dev_environment : bool = False
49+
4850
4951op_tags = {
5052 "dagster-k8s/config" : {
@@ -197,7 +199,11 @@ def run_sqlmesh(
197199 # If we specify a dev_environment, we will first plan it for
198200 # safety. Restatements are ignored as they may end up duplicating
199201 # work based on how restatement in planning works.
200- if dev_environment and not config .restate_models :
202+ if (
203+ dev_environment
204+ and config .use_dev_environment
205+ and not config .restate_models
206+ ):
201207 context .log .info ("Planning dev environment" )
202208 all (
203209 sqlmesh .run (
@@ -245,6 +251,18 @@ def run_sqlmesh(
245251 selection = all_assets_selection ,
246252 description = "All assets in the sqlmesh project" ,
247253 ),
254+ define_asset_job (
255+ name = "sqlmesh_all_assets_with_dev_environment" ,
256+ selection = all_assets_selection ,
257+ description = "All assets in the sqlmesh project with dev environment" ,
258+ config = RunConfig (
259+ ops = {
260+ "sqlmesh_project" : SQLMeshRunConfig (
261+ use_dev_environment = True ,
262+ ),
263+ }
264+ ),
265+ ),
248266 # Job to restate all project and collection related assets
249267 define_asset_job (
250268 name = "sqlmesh_restate_project_collection_assets" ,
0 commit comments