Extract SubSet of Dependent Tables

View: New views
1 Messages — Rating Filter:   Alert me  

Extract SubSet of Dependent Tables

by martin.ororke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi guys I am using DBUnit to try and extract just 1 or 2 rows from a live database in the organisation and store the root table and its dependent tables in a dataset.

IDataSet depSet = TablesDependencyHelper.getDataset(dbConnection, "SCHEMA.TABLE",
                new HashSet(Arrays.asList(new Double(2000000051711.000))));
        FlatXmlWriter depsWriter = new FlatXmlWriter(new FileOutputStream("TableDeps.xml"));
        depsWriter.write(depSet);

I always seem to get an OutOfMemory exception with this approach and I can't seem to just extract the rows where the ID = 2000000051711.000.

The database in question is HUGE, hundreds of thousands or rows and is a DB2 database, is there any way I can get around this problem?

Is it possible to use a StreamingDataSet for dependent table database extraction?

Thanks for any help you can provide.

Marty