Releases: lightdash/python-sdk
Releases · lightdash/python-sdk
Release list
v1.1.0
lightdash 1.1.0
A feature-packed release for the Python SDK focused on getting data out at scale, richer filtering, and a smoother developer experience.
pip install --upgrade lightdash🚀 Highlights
Compile a query to SQL without running it
Inspect the exact warehouse SQL Lightdash would generate — or run it yourself when you need more than the query API returns (BigQuery/bigframes, dbt, a data pipeline, etc.). Nothing executes and no rows are fetched.
sql = (
model.query()
.metrics(model.metrics.revenue)
.dimensions(model.dimensions.country)
.filter(model.dimensions.status == "active")
.compile()
)
print(sql) # SELECT ... FROM ... WHERE ... GROUP BY ... LIMIT 500No more 50k-row ceiling
Result sets are now paged automatically, so you can pull as many rows as your instance allows — the old 50,000-row cap is gone. Use .to_records() / .to_df() as before, or stream lazily with .iter_pages() and .to_df_lazy() for very large pulls.
df = model.query().metrics(model.metrics.revenue).limit(1_000_000).to_df()✨ More filtering power
- Filter on table calculations — apply filters to computed/derived fields, not just raw dimensions and metrics.
- Multiple filters on the same dimension — e.g. combine a lower and upper bound on one field.
between()/not_between()helpers on dimensions for clean range filters.
🔐 Service-account authentication
- Authentication now uses a
Bearertoken header, enabling personal access tokens and service accounts to work seamlessly.
🐛 Reliability
- Clearer errors for connection, authentication, and API failures — when something goes wrong, the SDK now tells you what and why instead of surfacing an opaque exception.
Full commit list
Features
- Compile a query to warehouse SQL without executing it (#30)
- Fetch results beyond the old 50k row cap (#25)
- Support filtering on table calculations (#24)
- Support multiple filters on the same dimension field (#22)
- Add
between()andnot_between()helpers to Dimension (#15)
Fixes
- Clear errors for connection, auth, and API failures (#28)
- Set auth header to
Bearerto support service accounts (#18)
Docs & internal
Full changelog: v1.0.1...v1.1.0