[Python] How to show the streaming parts of a polars query using explain()?

Discussão em 'Python' iniciado por Stack, Novembro 28, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to explain() a Polars query to see which operations can be executed using the streaming engine. Currently, I am only able to do this using show_graph().

    From sources on the web, I see that the older versions of Polars included --STREAMING tags in the output of explain(). Is it possible to have that detail with explain() in recent versions of Polars?

    q = (
    lz_files_lazy
    .join(bronze_files, on="source_file", how="anti")
    .select("source_file")
    )

    # OK: shows the legend and which stages are streaming
    q.show_graph(plan_stage="physical",output_path="myplan.png",engine="streaming")

    # No mention of streaming in recent polars versions?
    q.explain(format='plain',engine="streaming")

    Continue reading...

Compartilhe esta Página