From 1507c91e80b07613a103887c042ace04242f8efa Mon Sep 17 00:00:00 2001 From: George Sittas Date: Sun, 2 Jun 2024 16:27:09 +0300 Subject: [PATCH] Chore: update ibis example --- 002_ibis/models/ibis_full_model_python.py | 6 +++--- 002_ibis/models/ibis_full_model_sql.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/002_ibis/models/ibis_full_model_python.py b/002_ibis/models/ibis_full_model_python.py index 7b30895..08e929e 100644 --- a/002_ibis/models/ibis_full_model_python.py +++ b/002_ibis/models/ibis_full_model_python.py @@ -7,12 +7,12 @@ from sqlglot import exp from sqlmesh import ExecutionContext, model -from sqlmesh.core.model import FullKind +from sqlmesh.core.model import ModelKindName @model( "ibis.ibis_full_model_python", - kind=FullKind(), + kind=dict(name=ModelKindName.FULL), columns={ "item_id": "int", "num_orders": "int", @@ -33,7 +33,7 @@ def execute( con = ibis.duckdb.connect(DB_PATH) # retrieve table - incremental_model = con.table(name=upstream_model.name, schema=upstream_model.db) + incremental_model = con.table(name=upstream_model.name, database=upstream_model.db) # build query count = incremental_model.id.nunique() diff --git a/002_ibis/models/ibis_full_model_sql.py b/002_ibis/models/ibis_full_model_sql.py index a4fc986..efaa388 100644 --- a/002_ibis/models/ibis_full_model_sql.py +++ b/002_ibis/models/ibis_full_model_sql.py @@ -17,7 +17,7 @@ def entrypoint(evaluator: MacroEvaluator) -> str: incremental_model = UnboundTable( name="incremental_model", schema={"id": "int32", "item_id": "int32", "ds": "varchar"}, - namespace=Namespace(database="local", schema="ibis"), + namespace=Namespace(catalog="local", database="ibis"), ).to_expr() # build query