The easiest way to do this interactively, is to open the data table in question, go to the pull down menu and select:
Rows==>Row Selection==>Select Randomly
Then go to
Tables==>Subset
Create the new data table
In original data table, rt click on one of the selected rows and select
Invert Selection
Then go back to
Tables==>Subset
and create your second data table
This can also be simply scripted
Names Default To Here( 1 );
dt = Current Data Table();
// Create a Uniformly Random column
dt << New Column( "my random sample", formula( Random Uniform() ) );
// Select 20% of the data
dt << select where( :my random sample <= .2 );
// Delete the random number column since it is no longer needed
dt << delete columns( "my random sample" );
// Put those selected rows into a Validate data table
dt << subset( selected rows( 1 ), selected columns( 0 ), output table name( "Validate" ) );
// Invert the row selection
dt << invert row selection;
// Place all of those rows into the Training data table
dt << subset( selected rows( 1 ), selected columns( 0 ), output table name( "Training" ) );
Jim