Skip to content

Commit ce73829

Browse files
committed
Finish test
1 parent bf30d26 commit ce73829

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

tests/core/engine_adapter/integration/test_integration_snowflake.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,11 @@ def test_create_iceberg_table(ctx: TestContext, engine_adapter: SnowflakeEngineA
231231
def test_snowpark_concurrency(ctx: TestContext) -> None:
232232
from snowflake.snowpark import DataFrame
233233

234+
table = ctx.table("my_model")
235+
236+
# this model will insert 10 records in batches of 1, with 4 batches at a time running concurrently
234237
@model(
235-
name="my_model",
238+
name=table.sql(),
236239
kind=dict(
237240
name=ModelKindName.INCREMENTAL_BY_TIME_RANGE,
238241
time_column="ds",
@@ -249,7 +252,7 @@ def execute(context: ExecutionContext, start: datetime, **kwargs) -> DataFrame:
249252

250253
raise ValueError("Snowpark not present!")
251254

252-
m = model.get_registry()["my_model"].model(
255+
m = model.get_registry()[table.sql().lower()].model(
253256
module_path=Path("."), path=Path("."), dialect="snowflake"
254257
)
255258

@@ -265,4 +268,6 @@ def execute(context: ExecutionContext, start: datetime, **kwargs) -> DataFrame:
265268

266269
assert len(plan.new_snapshots) == 1
267270

268-
# todo: read table result
271+
query = exp.select("*").from_(table)
272+
df = ctx.engine_adapter.fetchdf(query, quote_identifiers=True)
273+
assert len(df) == 10

0 commit comments

Comments
 (0)