programatically call liquibase for data diff?

Hi, I have read a similar post, https://forum.liquibase.org/topic/is-it-possible-to-generatechangelog-difftypes-data-programatically, for generating data diff changelogs in java/junit code. I tried a similar way in my code with Liquibase 3.4.2 and set DiffTypes in code (code attached). However it did not work.


I am not sure if I set the DiffTypes correctly and wonder if this version of Library supports data diff or which version is capable of? Thanks.

- Diff DB
         new DiffToChangeLog(finalDiffResult, new DiffOutputControl(false, true, true)).print(new PrintStream(output));


When you say it “did not work”, could you be more specific? What did you expect to happen? What actually happened? Was there an error message? 

Also, that link does not work - when I click it I get a ‘404 not found’ page.

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

 I tried including “data” in Difftypes parameter and inserting data in DB, then run my diff code against a null DB. However, I could see diffs of schema but no content diffs. 

This happened by comparing both DBs and snapshots.

The link is at http://forum.liquibase.org/topic/is-it-possible-to-generatechangelog-difftypes-data-programatically

Thanks.

It appears that you may need to call the method DiffOuitputControl.setDataDir() to get the data in the output. 

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/