Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hello,
I need to access binary files from a container. The dataiku.Folder class doesn't work and I am using dataikuapi.dss.managedfolder.DSSManagedFolder instead because it is like calling the folder from outside Dataiku. I need to read a file from this folder, for that I am using the get_file() method. How can I get the file content in binary after that? And how can I write a binary file to DSSManagedFolder?
Thank you!
Hi,
in a container you indeed can't use direct-access APIs like get_path() (for obvious reasons). Instead you need to use https://doc.dataiku.com/dss/latest/python-api/managed_folders.html#dataiku.Folder.get_download_strea... and https://doc.dataiku.com/dss/latest/python-api/managed_folders.html#dataiku.Folder.upload_stream (or one of the upload_*** variants). The equivalent in the public API is get_file() and put_file() as yoiu've found.
Hi,
in a container you indeed can't use direct-access APIs like get_path() (for obvious reasons). Instead you need to use https://doc.dataiku.com/dss/latest/python-api/managed_folders.html#dataiku.Folder.get_download_strea... and https://doc.dataiku.com/dss/latest/python-api/managed_folders.html#dataiku.Folder.upload_stream (or one of the upload_*** variants). The equivalent in the public API is get_file() and put_file() as yoiu've found.