Skip to main content

PolarsReader

While Lazyframes are more efficient, certain operations can be trickier to implement, For small-data operations, you may be better of using the standard Polars Dataframe with PolarsReader:
import gluestick as gs
import polars as pl

reader = gs.PolarsReader()

TENANT_ID = "TENANT_123"

for stream in reader.input_files.keys():
    df = reader.get(stream, catalog_types=True)
    df["tenant_id"] = TENANT_ID
    gs.to_export(df, stream, "./etl-output", keys=["id"])