apache / apache/airflow

Make the interface of common.sql DBApiHook type-defined

Open
#36,224 0 comments 0 reactions 1 assignee Claimed by @potiuk View on GitHub
kind:meta
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 7h
Merged PRs (30d)
484

Description

### Body

The current interface of DBApiHook is well described now in the ADR https://github.com/apache/airflow/blob/main/airflow/providers/common/sql/doc/adr/0002-return-common-data-structure-from-dbapihook-derived-hooks.md - but it's not enforced. We should see if we can use Python typing (or posibly other mechanisms) to make the interfaced more stable and enforced. That also includes review of the common.sql API now captured in the .pyi interface (but likely somewhat not complete/broken) which we created in order to make the common.sql API stable.

That needs a new ADR describing it as well.

That is pretty related and should bring `common.sql` API to the level it should have from the very beginning, hopefully becoming a "golden standard" for other common interfaces we expose to our providers.

cc: @bolkedebruin @Taragolis

### Committer

- [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.