seamusabshere/remote_table

Permit to set the temp folder

Closed this issue · 1 comments

xdmx commented

I'm using remote_table with data_miner and I see that remote_table downloads the files in the /tmp/ folder.

As I'm currently running on Engine Yard, the problem is that I don't have many disk space in that folder.

It would be great to be able to set something like /tmp/foo which is a symbolic link to /mnt/foo which has hundreds of gb available instead of a few like now

hi @xdmx,

remote_table will respect ENV['TMPDIR'], so just set that to whatever you want:

alzabo0:~ $ mkdir abcdefg
alzabo0:~ $ TMPDIR=/Users/seamusabshere/abcdefg irb
>> require 'remote_table'
=> true
>> class RemoteTable::LocalCopy; def cleanup; puts "stopping before removing tmp files"; raise SystemExit; end; end
=> nil
>> RemoteTable.new('http://data.brighterplanet.com/countries.csv').first
stopping before removing tmp files
alzabo0:~ $ ls abcdefg
unix_utils_4f59fa4e_countries_csv_csv.csv

that shows tmp files are being written to, in this case, /Users/seamusabshere/abcdefg

thanks!