cancel
Showing results for 
Search instead for 
Did you mean: 

Script Snap: Write files to SLDB?

kunghei
New Contributor

Hello,

I was hoping to use python on that snap to do something like this:

#os.chdir(‘/opt/snaplogic’)
os.chdir(‘sldb:///shared’)
f=open(“blah.txt”, “wb”)
f.write(“hello test”)
f.close()

The intention is to save this blah.txt file generated in the Script Snap container to SLDB so that I can see it when I open Manager tab on Snaplogic platform.

Is this doable?

For context:

We have a url to download a 3GB file.
Ideally, we would just use a Rest Get snap.
However, I’ve heard that there’s a 2GB file size limit on Rest Get (Correct me if I am wrong on this.)

Therefore, as a workaround, I was trying to use the script snap to download it to SLDB so that downstream snaps could do the unzip and interact with files there. But I am not sure if the script snap runs on the same directory / machine as the SLDB.

Thanks.

0 REPLIES 0