blob: 96fee1d2feb9597542142743a48e8a7a360d279f [file] [log] [blame]
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
:documentationPath: /plugins/transforms/
:language: en_US
:page-alternativeEditUrl: https://github.com/apache/incubator-hop/edit/master/plugins/transforms/tablecompare/src/main/doc/tablecompare.adoc
= Table Compare
== Description
This transform compares the data from two tables (provided they have the same lay-out). It'll find differences between the data in the two tables and log it.
== Options
[width="90%", options="header"]
|===
|Option|Description
|Transform name|Name of the transform; This name has to be unique in a single pipeline
|Reference connection / Compare connection|Database connections from which the reference/compare table data will come.
|Reference schema field / Compare schema field|contain the schema names for the reference/compare table.
|Reference table field / Compare table field|contain the actual table names. This means that you could compare two tables with a different name, as long as they have the same column names.
|Key fields field|should contain a comma separated list of they fields that make up the 'primary' key of the table(s) you are comparing. The primary key is needed because without this information the two tables cannot be correctly joined.
|Exclude fields field|contains a comma separated list of columns that you want to exclude from the comparison. E.g. because they exist in the first table, but not in the second.
|Number of errors field|allows you to specify the name of the output column that will contain the total number of errors found for the comparison of your tables.
|Number of reference/compare table records field|allows you to specify the name of the field that will contain the actual number of records found in each table.
|Number of left/inner/right join errors field|allows you to specify the name of the field(s) that will contain the number of errors found for each join type.
|Error handling key description input field|allows you specify the name of the output field for the 'where clause" of the record that gave an error.
|Error handling reference/compare value input field|allows you to specify the output field names for the actual values that differ.
|===