unzip a password protected file using synapse notebook

anuintuceo
Databricks Partner

I have a zipped file. It has 3 csv files.  It is password protected. When I tried extracting it manually it will extract only with 7zip. 

I moved my zipped file to ADLS automatically and want to extract it with the password. 

How to unzip the file and read all the csv's

-werners-
Esteemed Contributor III

 it is most probably possible.
If you use python, the zipfile library can do it, something like this:

with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
            zip_ref.extractall(path=extract_to, pwd=bytes(password,'utf-8'))

 In scala there is f.e. zip4j