File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
warehouse/metrics_tools/factory Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 3434from metrics_tools .transformer .qualify import QualifyTransform
3535from metrics_tools .utils .logging import add_metrics_tools_to_sqlmesh_logging
3636from sqlglot import exp
37+ from sqlmesh .core .dialect import parse_one
38+ from sqlmesh .core .macros import MacroEvaluator
3739from sqlmesh .core .model import ModelKindName
3840
3941logger = logging .getLogger (__name__ )
@@ -516,3 +518,24 @@ def timeseries_metrics(
516518 GLOBAL_TIMESERIES_METRICS [calling_file ] = timeseries_metrics
517519
518520 return timeseries_metrics .generate_models (calling_file )
521+
522+
523+ # This is to maintain compatibility with the deployed version of sqlmesh models
524+ # We need a way to ensure that changes to generated models are never breaking
525+ # (we will likely need some testing for this)
526+ def generated_query (
527+ evaluator : MacroEvaluator ,
528+ * args : t .Any ,
529+ ** kwargs : t .Any ,
530+ ):
531+ """LEGACY VERSION THAT WILL BE DELETED"""
532+ return parse_one ("select 1" )
533+
534+
535+ def join_all_of_entity_type (
536+ evaluator : MacroEvaluator ,
537+ * args : t .Any ,
538+ ** kwargs : t .Any ,
539+ ):
540+ """LEGACY VERSION THAT WILL BE DELETED"""
541+ return parse_one ("select 1" )
You can’t perform that action at this time.
0 commit comments