WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

[Improvement] support output full row infos in check result #424

@caiq1nyu

Description

@caiq1nyu

Motivations

The current check results are similar to:

// diff
{"log_type":"Diff","schema":"test_db_1","tb":"one_pk_multi_uk","id_col_values":{"f_0":"5"},"diff_col_values":{"f_1":{"src":"5","dst":"5000"}}}
// miss
{"log_type":"Miss","schema":"test_db_1","tb":"no_pk_one_uk","id_col_values":{"f_1":"8","f_2":"1"},"diff_col_values":{}}

In most cases, the business needs complete row data to help analyze the causes of the differences

Solution

add a control configuration switch to output complete line information, and output like:

{
	"log_type": "Diff",
	"schema": "test_db_1",
	"tb": "one_pk_multi_uk",
	"id_col_values": {
		"f_0": "5"
	},
	"diff_col_values": {
		"f_1": {
			"src": "5",
			"dst": "5000"
		}
	},
	"src_row": {
		"f_0": 5,
		"f_1": 5,
		"f_2": "ok"
	},
	"dst_row": {
		"f_0": 5,
		"f_1": 5000,
		"f_2": "after manual update"
	}
}

Metadata

Metadata

Assignees

Labels

EnhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions