# Root2arrow: converting ROOT TTrees to Arrow Records

**URL:** <https://root-forum.cern.ch/t/root2arrow-converting-root-ttrees-to-arrow-records/34358>\
**Category:** Evolution Proposals, Apps & Ideas\
**Created:** [May 31, 2019, 6:19pm UTC](https://root-forum.cern.ch/t/root2arrow-converting-root-ttrees-to-arrow-records/34358 "2019-05-31T18:19:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbinet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/sbinet/32/13166_2.png) [@sbinet](https://root-forum.cern.ch/u/sbinet)\
**Post date:** [May 31, 2019, 6:19pm UTC](https://root-forum.cern.ch/t/root2arrow-converting-root-ttrees-to-arrow-records/34358/1 "2019-05-31T18:19:25Z")

</div>

hi there,

just a quick announcement that as of [v0.19.0](https://go-hep.org/news/release-0.19.0/), GoHEP can now convert ROOT TTrees to Arrow Records (and store them into an Arrow File or an Arrow Stream) via the `root2arrow` command:

```auto
$> go doc go-hep.org/x/hep/cmd/root2arrow
root2arrow converts the content of a ROOT TTree to an ARROW file.

    Usage of root2arrow:
      -o string
        	path to output ARROW file name (default "output.data")
      -stream
        	enable ARROW stream (default is to create an ARROW file)
      -t string
        	name of the tree to convert (default "tree")

    $> root2arrow -o foo.data -t tree ../../groot/testdata/simple.root
    $> arrow-ls ./foo.data
    version: V4
    schema:
      fields: 3
        - one: type=int32
        - two: type=float32
        - three: type=utf8
    records: 1
    $> arrow-cat ./foo.data
    version: V4
    record 1/1...
      col[0] "one": [1 2 3 4]
      col[1] "two": [1.1 2.2 3.3 4.4]
      col[2] "three": ["uno" "dos" "tres" "quatro"]

```

(the `arrow-ls` and `arrow-cat` commands come with the [go-arrow](https://godoc.org/github.com/apache/arrow/go/arrow) package from [Apache Arrow](https://arrow.apache.org).)

This opens another bridge between ROOT and other communities 🙂

hth,  
-s
