Tags: bruin-data/python-sdk
Tags
feat: bruin-sdk v0.2.0 — new connections, auth parity, context manager Add 6 new connection types (Databricks, ClickHouse, Athena, Trino, SQLite, MotherDuck) plus Synapse (reuses MSSQL). Full auth parity with Bruin CLI: GCP supports ADC and SA JSON, Snowflake supports key-pair auth. Connections are now context managers with close(). Fixes from code review: GCPConnection.close() override, commit() only on transactional DBs, CTE-DML detection, shared _run_query() helper, module-level frozenset constants. Tests: 100 → 146, all passing. Co-Authored-By: Claude Opus 4.6 <[email protected]>
fix: address code review findings across SDK - Lazy pandas import: only imported in postgres/mssql/mysql SELECT path - Fix wrong exception: ConnectionNotFoundError for missing connection - Remove unimplemented databricks/aws extras from pyproject.toml - Connection.query() calls _execute directly, preserving cached clients - GCP bigquery() reuses self.credentials instead of re-parsing SA JSON - Add KeyError handling for missing service_account_json - Add error handling in _context.py for malformed dates and JSON - Validate context.vars returns a dict (reject arrays/scalars) - Fix comment-stripping regex to handle EOF without trailing newline - Update docs: add redshift/sheets extras, fix connection types table - Remove dead imports in tests Co-Authored-By: Claude Opus 4.6 <[email protected]>