30d ago (edited) in Technical
Creating .zip in notebook
I got bunch of .delta table which in need to save as .json and zip them together to submit it tothrid party tool for futher processing. I was able to get all .delta tables into .json files in a single folder,. My consolidated .json folder is 'Files/temp/consolidated/' (see image below), but when trying to zip them together getting error: not able to find path with zipf.write(json_file_path, arcname=f)
code:
with zipfile.ZipFile('sample.zip', 'w') as zipf:
for f in filenames:
json_file_path = f"Files/temp/consolidated/{f}"
print (json_file_path)
zipf.write(json_file_path,arcname=f)
what i learnt was:
Microsoft Fabric Context: The Fabric environment uses a virtual file system, which doesn’t provide direct file path access as in traditional file systems.
zipfile.ZipFile.write Limitation: This method expects a direct file path, which isn't available for Fabric paths.
Any one had this scenario, how did they get around it?
0
1 comment
Sreedhar Vengala
2
Creating .zip in notebook
Learn Microsoft Fabric
skool.com/microsoft-fabric
Helping passionate analysts, data engineers, data scientists (& more) to advance their careers on the Microsoft Fabric platform.
Leaderboard (30-day)
powered by