Saturday, August 28, 2010
Friday, August 27, 2010
0.6.6 allows composing plans from multiple files
It's fairly common to have information needed for a plan that you would like to reuse across multiple plans. For instance, if you are diff'ng DB sources, it would be nice to isolate the DB connection information to one file that could be reused across different comparisons.
0.6.6 now allows this via the -planfiles argument. -planfiles can take as a value either a single file name or multiple comma separated file names. It then composites the files to create a single plan. Here's an example:
file: test3.plan.xml
...
file: sources.xml
...
Note that the bean id="rhs.source" is nowhere defined in the file test3.plan.xml. It's only defined in the file sources.xml
0.6.6 now allows this via the -planfiles argument. -planfiles can take as a value either a single file name or multiple comma separated file names. It then composites the files to create a single plan. Here's an example:
joe$ java -jar diffkit-app.jar -planfiles test3.plan.xml,sources.xml file: test3.plan.xml
...
<bean id="plan" class="org.diffkit.diff.conf.DKPassthroughPlan">
<property name="lhsSource" ref="lhs.source" />
<property name="rhsSource" ref="rhs.source" />
<property name="sink" ref="sink" />
<property name="tableComparison" ref="table.comparison" />
</bean>
file: sources.xml
...
<bean id="rhs.source" class="org.diffkit.diff.sns.DKFileSource">
<constructor-arg index="0"
value="./test3.rhs.csv" />
<constructor-arg index="1" ref="lhs.table.model" />
<constructor-arg index="2">
<null />
</constructor-arg>
<constructor-arg index="3">
<null />
</constructor-arg>
<constructor-arg index="4" value="\," />
<constructor-arg index="5" value="true" />
<constructor-arg index="6" value="true" />
</bean>
Note that the bean id="rhs.source" is nowhere defined in the file test3.plan.xml. It's only defined in the file sources.xml
much improved command line interface in 0.6.6
0.6.6 was just released. By default, all of the logback INFO level spam is gone from the standard output. Instead, there is now a minimalist output that includes a simple, high-level, diff report. e.g.
joe$ java -jar diffkit-app.jar -planfiles test9.plan.xml
planfile(s)->test9.plan.xml
lhsSource->DKFileSource@3c3ac93e[/Users/joe/Develope/EclipseWorkspace/DiffKit/dist/./test9.lhs.csv]
rhsSource->DKFileSource@37722456[/Users/joe/Develope/EclipseWorkspace/DiffKit/dist/./test9.rhs.csv]
sink->DKFileSink[/Users/joe/Develope/EclipseWorkspace/DiffKit/dist/./test9.sink.diff]
tableComparison->org.diffkit.diff.conf.DKAutomaticTableComparison@38aa233f
---
diff'd 9 rows, found:
!4 row diffs
@2 column diffs
It's still possible to get the logback spam. You need to edit conf/logback.xml to change the root logger level to info (instead of warn), and then specify the command line param to force diffkit-app.jar to use that logback.xml conf file.
Thursday, August 26, 2010
0.6.5 released -- add support for most SQL data types
supported SQL data types are now: VARCHAR, BIGINT, DATE, CHAR, TIME, INT, DECIMAL, DOUBLE, REAL, TIMESTAMP, BOOLEAN, TINYINT, SMALLINT
Saturday, August 21, 2010
0.6.2 released-- DiffKit now diffs across different databases
LHS table can be in one DB, while RHS table can be in another. TestCase 18 demos the feature.
Friday, August 20, 2010
DB2 -- more trouble
Turns out that the version of the jdbc driver we are using has a different behavior than all other jdbc drivers. The javadoc indicates that you should be able to make repeated calls to ResultSet.next() and simply get a null when the end of the RS has been reached. But the db2 driver blows up after the first call to an exhausted (consumed) RS:
Caused by: com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10120][10898] Invalid
operation: result set is closed.
at com.ibm.db2.jcc.b.zf.lb(zf.java:3276) [diffkit-app.jar:na]
at com.ibm.db2.jcc.b.zf.c(zf.java:252) [diffkit-app.jar:na]
at com.ibm.db2.jcc.b.zf.next(zf.java:237) [diffkit-app.jar:na]
at org.diffkit.diff.sns.DKDBSource.getNextRow(DKDBSource.java:142) [diff
kit-app.jar:na]
According to this, there is a new db2 jdbc driver that cures this behavior, and as a bonus doesn't require a license file!
db2 9.5
This is part of the 9.5 release, so I'm not sure it will be compatible with lower versions, but seems worth a try.
Caused by: com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10120][10898] Invalid
operation: result set is closed.
at com.ibm.db2.jcc.b.zf.lb(zf.java:3276) [diffkit-app.jar:na]
at com.ibm.db2.jcc.b.zf.c(zf.java:252) [diffkit-app.jar:na]
at com.ibm.db2.jcc.b.zf.next(zf.java:237) [diffkit-app.jar:na]
at org.diffkit.diff.sns.DKDBSource.getNextRow(DKDBSource.java:142) [diff
kit-app.jar:na]
According to this, there is a new db2 jdbc driver that cures this behavior, and as a bonus doesn't require a license file!
db2 9.5
This is part of the 9.5 release, so I'm not sure it will be compatible with lower versions, but seems worth a try.
DiffKit now builds and executes under Java 1.5
The 0.5.3 release builds and passes all TCs under JDK/JRE 1.5 on Windoze.
Subscribe to:
Posts (Atom)