Posts

Showing posts with the label external

Time machine backups fail on new Toshiba drive

I did not develop this solution on my own. I found it in the Apple discussion forums , specifically this thread . Here are the details. I purchased a new external drive, the Toshiba Canivo Basics 1.5TB model number  HDTB115XK3BA at Best Buy. I then follow the directions here to copy my old backup to the new drive. I went to back it up after the transfer and it immediately failed. The transfer had completed while I was at work so it had been 6+ hours since the transfer completed. That was plenty of time for the new hard drive to go to sleep. Turns out this is a habit of Toshiba drives from what I've been reading. I unchecked the option Put the hard disk(s) to sleep when possible in System Preferences/Engergy Saver and rebooted but that didn't fix the problem. I then came across a post about creating a crontab job to touch a file every minute to keep the drive away. Brilliant. So I now have the following crontab job that runs as the user I log in with every day. * * * * * to...

Greenplum external table single column of data

Had to work with some data that was one column of data in a fixed width format. Solution was to create an external table that was one column then use substr function to pull out the data. External table: CREATE EXTERNAL TABLE trmtmp_ext_table (     col1 text ) LOCATION (         'gpfdist://host-1:port/path/trmtmp.out',         'gpfdist://host-2:port/path/trmtmp.out',         'gpfdist://host-3:port/path/trmtmp.out' ) FORMAT 'text' LOG ERRORS INTO trmtmp_err_ext_table SEGMENT REJECT LIMIT 5 ROWS; View of the external table: DROP VIEW trmtmp_view_ext_tbl; CREATE VIEW trmtmp_view_ext_tbl AS ( SELECT     substr(col1,1,2) AS col1,     substr(col1,3,5) AS col2 FROM       trmtmp_ext_table ); Extrapolate from there.