kaxil opened a new pull request, #62634: URL: https://github.com/apache/airflow/pull/62634
IcebergHook previously only fetched OAuth2 tokens. This reworks it into a proper catalog client that can list namespaces, list tables, read schemas, inspect partitions, and access snapshot metadata — all needed for AIP-99 LLM operators to generate accurate SQL against Iceberg tables. ## What changed **Breaking change on `get_conn()`**: Returns a `pyiceberg.catalog.Catalog` instead of a token string. The old behavior moves to `get_token()`. `get_token_macro()` is updated automatically, so Jinja2 templates continue to work. **New methods**: - `list_namespaces()`, `list_tables(namespace)`, `table_exists(table_name)`, `load_table(table_name)` - `get_table_schema(table_name)` — returns `list[dict]` with `name`/`type` keys, matching the `DbApiHook` contract so LLM operators can use IcebergHook interchangeably - `get_partition_spec(table_name)`, `get_table_properties(table_name)`, `get_snapshots(table_name, limit)` **Dependency**: `pyiceberg>=0.8.0` promoted from dev-only to runtime. All APIs verified to exist at the minimum version via the pyiceberg-0.8.0 tag. **Version**: Bumped to 2.0.0 (breaking change on `get_conn()` return type). --- ##### Was generative AI tooling used to co-author this PR? - [ ] Yes -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
