[ 
https://issues.apache.org/jira/browse/ARROW-14740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17446057#comment-17446057
 ] 

Jonathan Keane commented on ARROW-14740:
----------------------------------------

Yeah, this helper would be relatively lightweight. What you mention about the R 
helpers is accurate, it's basically:

* handles creating/using an already created connection (unless it's given in 
{{con}})
* handles naming (unless it's given)
* auto-cleanup 
* do the actual duckdb registration

The auto cleanup would be nice, but is not strictly necessary. It was 
(relatively) easy to wire up in R, so I did, though I did need to use a 
slightly different route than normal: see 
https://github.com/duckdb/duckdb/issues/2237 and 
https://github.com/duckdb/duckdb/pull/2408 which might need to also be exposed 
in Python to do it




> [Python] duckdb helper functions
> --------------------------------
>
>                 Key: ARROW-14740
>                 URL: https://issues.apache.org/jira/browse/ARROW-14740
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Jonathan Keane
>            Priority: Major
>
> In the R package, [we have an integration with 
> DuckDB|https://github.com/apache/arrow/blob/master/r/R/duckdb.R] that uses 
> the C-Data and C-Stream interface, we include a handful of helper functions 
> that handle the conversion for end users (including setting up the DuckDB 
> connection, registering the arrow data, etc.)
> Should we also have some helper functions in pyarrow?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to