I have to read zipped csv file using spark without unzipping it. can anyone please provide pyspark/spark sql code for that?
Zipped csv files are receiving to s3 raw layer.
- 35124 Views
- 6 replies
- 3 kudos
Latest Reply
@Jog Giri​ I also recently encountered a similar scenario, the below code solved my purpose without any issues.import zipfile for i in dbutils.fs.ls('/mnt/zipfilespath/'): with zipfile.ZipFile(i.path.replace('dbfs:','/dbfs'), mode="r") as zip_ref:...
- 3 kudos