How to create an Explorer DataFrame from and Adbc Result? Is going via Adbc.Result.to_map the correct way?

I’m loving Adbc which is super fast! I’m creating Explorer DataFrames like this:

Adbc.Connection.query!(Suprabonds.AdbcConn, "Select * from trace") 
|> Adbc.Result.to_map 
|> Explorer.DataFrame.new

Just wondering if this is the best way? For large numbers of rows the to_map intermediate stage is taking quite a long time.

Does Explorer use Apache Arrow under the hood as well? If so can we go directly from an Adbc.Result to an Explorer.DataFrame without the to_map stage?

What’s the fastest way of getting from Adbc.Result to Explorer.DataFrame?

Use Explorer.DataFrame.from_query!(Suprabonds.AdbcConn, "Select * from trace") instead. It will allocate the underling arrow data only once and pass it directly to Explorer.

1 Like

Needs an empty list for options but otherwise works great. Thanks.

Explorer.DataFrame.from_query!(Suprabonds.AdbcConn, "Select * from trace", [])