Skip to content

Commit

Permalink
Chore: update ibis example
Browse files Browse the repository at this point in the history
  • Loading branch information
georgesittas committed Jun 2, 2024
1 parent c178a78 commit 1507c91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions 002_ibis/models/ibis_full_model_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion 002_ibis/models/ibis_full_model_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1507c91

Please sign in to comment.