@Override
public DDF copyFrom(DDF ddf, String tgtname) throws DDFException {
mLog.info(String.format(">>> Copy new ddf %s from ddf %s", tgtname, ddf.getName()));
DDFManager fromManager = ddf.getManager();
DataSourceDescriptor dataSourceDescriptor = fromManager.getDataSourceDescriptor();
if (dataSourceDescriptor instanceof JDBCDataSourceDescriptor) {
JDBCDataSourceDescriptor jdbcDS = (JDBCDataSourceDescriptor) dataSourceDescriptor;
JDBCDataSourceDescriptor loadDS = new JDBCDataSourceDescriptor(jdbcDS.getDataSourceUri(), jdbcDS.getCredentials(), ddf.getTableName());
DDF tgtddf = this.load(loadDS);
this.setDDFName(tgtddf, tgtname);
return tgtddf;
} else {
throw new DDFException("Unsupported operation in copyFrom");
}
}