This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { asyncBufferFromUrl, parquetRead } from 'hyparquet' | |
| // Load parquet data from a url using hyparquet | |
| const url = 'https://hyperparam-public.s3.amazonaws.com/bunnies.parquet' | |
| async function main() { | |
| const file = await asyncBufferFromUrl({ url }) | |
| await parquetRead({ | |
| file, | |
| onComplete: (data) => console.log(data), | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { S3Client, GetObjectCommand } from '@aws-sdk/client-s3' | |
| const s3 = new S3Client() | |
| import { parquetMetadata, toJson } from 'hyparquet' | |
| export async function handler(event) { | |
| console.log('Event received:', JSON.stringify(event, null, 2)) | |
| // The event structure can contain multiple records if multiple files are uploaded at once. | |
| for (const record of event.Records) { | |
| const bucket = record.s3.bucket.name |