Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

412
Views
Write a json to a parquet object to put into S3 with Lambda Python

I would like to write a json object to S3 in parquet using Amazon Lambda (python)!

However I cannot connect fastparquet lib with boto3 in order to do it since the first lib has a method to writo into a file and boto3 expect an object to put into the S3 bucket

Any suggestion ?

fastparquet example

fastparque.write('test.parquet', df, compression='GZIP', file_scheme='hive')

Boto3 example

 client = authenticate_s3()
        response = client.put_object(Body=Body, Bucket=Bucket, Key=Key)

the Body would correspond to the parquet content! and it would allow to write into S3

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can write any dataframe to S3 by using the open_with argument of the write method (see fastparquet's doc)

import s3fs
from fastparquet import write

s3 = s3fs.S3FileSystem()
myopen = s3.open
write(
    'bucket-name/filename.parq.gzip',
    frame,
    compression='GZIP',
    open_with=myopen
)
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!