googleapis / googleapis/google-cloud-python

support the Arrow PyCapsule Interface without a pyarrow dependency

未关闭
#15,699 3 条评论 3 个 reaction 已指派 1 人 已被 @tswast 认领 在 GitHub 查看
api: bigquery
主要语言
Python
星标
5.4k
派生
1.8k
平均合并
3 天 4 小时
30 天内合并 PR
122

描述

**Is your feature request related to a problem? Please describe.**

The polars community uses the arrow in-memory format without a need for a dependency on the heavy weight pyarrow package, but the easiest way to get arrow out of and into BigQuery with this client requires the use of the pyarrow dependency.

**Describe the solution you'd like**

Expose the Arrow PyCapsule Interface on RowIterator (returned by QueryJob.result(), Client.query_and_wait(), Client.list_rows()). This functionality should not require pyarrow. See: https://gist.github.com/tswast/99b017b20386e324f5c7d2bd49f21b5f for a related example of how this could be done.

**Describe alternatives you've considered**

* Separate package exposing the Arrow PyCapsule Interface
* Always require pyarrow
* Directly integrate into polars (in-progress)

**Additional context**

* [[Python] Promote usage of the Arrow PyCapsule Protocol (for the C Data Inteface) #39195](https://github.com/apache/arrow/issues/39195)
* [support adbc APIs in DB-API package](https://github.com/googleapis/python-bigquery/issues/2015#top)
* [Support inserting data into BigQuery directly from a Polars DataFrame](https://github.com/googleapis/google-cloud-python/issues/15710#top)

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。