mirror of
https://github.com/asadbek064/hyparquet.git
synced 2026-02-21 11:51:32 +00:00
Add parquetRead example to README
This commit is contained in:
parent
d8d453421c
commit
e3b3ddafa7
17
README.md
17
README.md
@ -69,6 +69,20 @@ const metadata = parquetMetadata(arrayBuffer)
|
||||
|
||||
To parse parquet files from a user drag-and-drop action, see example in [index.html](index.html).
|
||||
|
||||
## Reading Data
|
||||
|
||||
To read the entire contents of a parquet file in a browser environment:
|
||||
|
||||
```js
|
||||
const { parquetRead } = await import("https://cdn.jsdelivr.net/npm/hyparquet/src/hyparquet.min.js")
|
||||
const res = await fetch(url)
|
||||
const arrayBuffer = await res.arrayBuffer()
|
||||
await parquetRead({
|
||||
file: arrayBuffer,
|
||||
onComplete: data => console.log(data)
|
||||
})
|
||||
```
|
||||
|
||||
## Async
|
||||
|
||||
Hyparquet supports asynchronous fetching of parquet files, over a network.
|
||||
@ -76,7 +90,8 @@ You can provide an `AsyncBuffer` which is like a js `ArrayBuffer` but the `slice
|
||||
|
||||
## Supported Parquet Files
|
||||
|
||||
The parquet format supports a number of different compression and encoding types.
|
||||
The parquet format is known to be a sprawling format which includes options for a wide array of compression schemes, encoding types, and data structures.
|
||||
|
||||
Hyparquet does not support 100% of all parquet files.
|
||||
Supporting every possible compression codec available in parquet would blow up the size of the hyparquet library.
|
||||
In practice, most parquet files use snappy compression.
|
||||
|
||||
@ -27,15 +27,15 @@
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "20.11.30",
|
||||
"@typescript-eslint/eslint-plugin": "7.3.1",
|
||||
"@types/node": "20.12.3",
|
||||
"@typescript-eslint/eslint-plugin": "7.5.0",
|
||||
"@vitest/coverage-v8": "1.4.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-plugin-import": "2.29.1",
|
||||
"eslint-plugin-jsdoc": "48.2.1",
|
||||
"eslint-plugin-jsdoc": "48.2.2",
|
||||
"http-server": "14.1.1",
|
||||
"hysnappy": "0.3.0",
|
||||
"typescript": "5.4.2",
|
||||
"typescript": "5.4.3",
|
||||
"vitest": "1.4.0"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user