Survey banner
The Dataiku Community is moving to a new home! Some short term disruption starting next week: LEARN MORE

write pdf file to dataiku folder using python

Level 1
write pdf file to dataiku folder using python

I am trying to write a pdf filer to dataiku folder.
usually I can write pdf file in my device with:
with open(outputFile, "wb") as outputStream:

but it doesnt work withing Dataiku
Also I tried to use this: 

with open(os.path.join('Folder Location', "file.pdf")) as outputStream:

and it gives this error as there is no file that exists there 

FileNotFoundError: [Errno 2] No such file or directory: 

Operating system used: windows

0 Kudos
1 Reply

First issue, Dataiku's dirty little secret: it doesn't actually create the folder in the file system until you put a file in it. Go to your flow and add a dummy file to the folder manually. 

Second issue you can't write directly to a Dataiku folder, use either upload_steam or upload_file: