[ 
https://issues.apache.org/jira/browse/ARROW-7109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brian Hulette reassigned ARROW-7109:
------------------------------------

    Assignee: Brian Hulette

> [JS] Create table from Arrays
> -----------------------------
>
>                 Key: ARROW-7109
>                 URL: https://issues.apache.org/jira/browse/ARROW-7109
>             Project: Apache Arrow
>          Issue Type: Wish
>            Reporter: Sascha Hofmann
>            Assignee: Brian Hulette
>            Priority: Minor
>
> I am trying to generate an arrow table from JS arrays and followed the 
> example from [here | 
> [https://observablehq.com/@lmeyerov/manipulating-flat-arrays-arrow-style]] 
> but I am struggling to generate different schemas, most importantly how to 
> provide a type different then 'floatingpoint'. Right now, I have:
> {code:java}
> const data = Table.from({
>   schema: {
>     fields: [{name: 'a', nullable: false, children: Array(0), 
>      type: {name: 'floatingpoint', precision: 'SINGLE'}}]    
>     },    
>   batches: [{        
>    count: 10,        
>    columns: [{ name: 'a', count: 10, VALIDITY: [], 
>     DATA: Array.from({ length: 10 }, () => 'a') }]}]  
> })
> {code}
> Which, of course is non-sense but I couldn't figure out how to provide the 
> type (I tried type: Utf8 among others).  In general wouldn't it be a nice to 
> have create Table from object function?
> On another note, are there any plans to make the docs a little bit more 
> descriptive? Happy to contribute!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to