Skip to content

[dagster-polars] sink LazyFrame returned inside MaterializeResult - #360

Open
lukew-cogapp wants to merge 1 commit into
dagster-io:mainfrom
lukew-cogapp:dagster-polars-materialize-result-lazy
Open

lukew-cogapp wants to merge 1 commit into
dagster-io:mainfrom
lukew-cogapp:dagster-polars-materialize-result-lazy

Conversation

@lukew-cogapp

Copy link
Copy Markdown
Contributor

An asset that returns MaterializeResult(value=lazy_frame) has no output annotation for type_router_is_eager to read, so it resolves as eager. The LazyFrame goes to write_df_to_path and fails with AttributeError: 'LazyFrame' object has no attribute 'write_parquet'.

dump_to_path now checks the object too, so a pl.LazyFrame always goes to sink_df_to_path. Includes a regression test through PolarsParquetIOManager.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant