Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-2686

[JS] Add more documentation about loading a local Arrow IPC in Node

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • JS-0.4.0
    • JavaScript
    • None

    Description

      I'm trying to create load an arrow file in IPC format. 

      First, I load the library

      import

      { Table }

      from "@apache-arrow/es2015-esm";

      Then, I fetch the file and convert it to the buffer (it would be nice if this wasn't necessary)

      fetch(require("../data/flights-10k.arrow")).then(response => {
      response.blob().then(blob => {
      let arrayBuffer;
      const fileReader = new FileReader();
      fileReader.onload = function()

      { arrayBuffer = this.result; const table = Table.from(arrayBuffer); console.log(table.toString()); }

      ;
      fileReader.readAsArrayBuffer(blob);
      });
      });

      Now I get the error "Uncaught TypeError: Cannot read property 'fields' of undefined"

      Attachments

        Activity

          People

            Unassigned Unassigned
            domoritz Dominik Moritz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: