You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@arrow.apache.org by Koutsoukos Dimitrios <dk...@inf.ethz.ch> on 2021/05/22 09:26:39 UTC

Read CSV from std::vector using Apache Arrow

Hi,

I am trying to read a csv input format using Apache arrow. The example [here][1] mentions that the input should be an [InputStream][2], however in my case I just have an std::vector of unsigned chars  Is it possible to parse this using apache arrow? I have checked the [I/O interface][3] to see if there is an "in-memory" data structure with no luck. 
Any help would be appreciated!

Thanks,
Dimitris


  [1]: https://arrow.apache.org/docs/cpp/csv.html
  [2]: https://arrow.apache.org/docs/cpp/api/io.html#_CPPv4N5arrow2io11InputStreamE
  [3]: https://arrow.apache.org/docs/cpp/api/io.html

Re: Read CSV from std::vector using Apache Arrow

Posted by Neal Richardson <ne...@gmail.com>.
Can you wrap it in a Buffer and then use a BufferReader?

https://arrow.apache.org/docs/cpp/api/memory.html#buffers

Neal

On Sat, May 22, 2021 at 2:26 AM Koutsoukos Dimitrios <dk...@inf.ethz.ch>
wrote:

> Hi,
>
> I am trying to read a csv input format using Apache arrow. The example
> [here][1] mentions that the input should be an [InputStream][2], however in
> my case I just have an std::vector of unsigned chars  Is it possible to
> parse this using apache arrow? I have checked the [I/O interface][3] to see
> if there is an "in-memory" data structure with no luck.
> Any help would be appreciated!
>
> Thanks,
> Dimitris
>
>
>   [1]: https://arrow.apache.org/docs/cpp/csv.html
>   [2]:
> https://arrow.apache.org/docs/cpp/api/io.html#_CPPv4N5arrow2io11InputStreamE
>   [3]: https://arrow.apache.org/docs/cpp/api/io.html