Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.JS如何创建拼花地板文件并保存到Minio_Node.js_Parquet_Minio - Fatal编程技术网

Node.JS如何创建拼花地板文件并保存到Minio

Node.JS如何创建拼花地板文件并保存到Minio,node.js,parquet,minio,Node.js,Parquet,Minio,以下面NPM文档()中的示例为例,如何将生成的拼花地板文件直接写入minio。我希望避免将拼花地板文件写入磁盘,然后执行第二次操作将文件移动到minio中 下面的示例在调用close()后立即将文件写入磁盘 // advanced fruits table let schema = new ParquetSchema({ name: { type: 'UTF8' }, colours: { type: 'UTF8', repeated: true }, stock: { re

以下面NPM文档()中的示例为例,如何将生成的拼花地板文件直接写入minio。我希望避免将拼花地板文件写入磁盘,然后执行第二次操作将文件移动到minio中

下面的示例在调用close()后立即将文件写入磁盘

// advanced fruits table
let schema = new ParquetSchema({
  name: { type: 'UTF8' },
  colours: { type: 'UTF8', repeated: true },
  stock: {
    repeated: true,
    fields: {
      price: { type: 'DOUBLE' },
      quantity: { type: 'INT64' },
    }
  }
});

// the above schema allows us to store the following rows:
let writer = await ParquetWriter.openFile(schema, 'fruits.parquet');

await writer.appendRow({
  name: 'banana',
  colours: ['yellow'],
  stock: [
    { price: 2.45, quantity: 16 },
    { price: 2.60, quantity: 420 }
  ]
});

await writer.appendRow({
  name: 'apple',
  colours: ['red', 'green'],
  stock: [
    { price: 1.20, quantity: 42 },
    { price: 1.30, quantity: 230 }
  ]
});

await writer.close();