We are attempting to use BC to compare json formated data, and seem to be needing a blend of text compare and csv/data compare features.
I could use some pointers to how to coherce BC into matching up the pks (as it does for functions etc when comparing languages.
Three small sample records are pasted below. In this case mdl_pk is the key we'd like to align on.
Each record has a pk and we'd like BC to align the comparison by the pk.
If need be, we can inject a consistently named property to align on (eg RECORD_PK) and could probably arrange for it to be the first property in each record if that would help.
[
{
"mdl_auth_fk": "FA392775595B48C7A0198B3AFB83472D",
"mdl_id": "EP",
"mdl_instype_id": "ABC",
"mdl_order": 5,
"mdl_pk": "0236C75968424C2290DC5D295E86ABD4",
"mdl_prs_fk": "8973C2FEE6D34A8D9C7488AF31262EE6",
"mdl_systype": "XYZ",
"mdl_title": "This string could be quite long",
},
{
"mdl_auth_fk": "EE0D64533A134FDCA3B2746D4BE15377",
"mdl_id": "PD",
"mdl_instype_id": "ABC",
"mdl_order": 9,
"mdl_pk": "027C82A698FD4732A9E691C583CCC098",
"mdl_prs_fk": "8973C2FEE6D34A8D9C7488AF31262EE6",
"mdl_systype": "XYZ",
"mdl_title": "This string could be quite long",
"_mdl_pk_2009": 36
},
{
"mdl_auth_fk": "",
"mdl_id": "RPT",
"mdl_instype_id": "ABC",
"mdl_order": 10,
"mdl_pk": "06DAD869A9554E418AE426365BFFF775",
"mdl_prs_fk": "857D1F06BAE24BB3A3CE0D9DBE7DE890",
"mdl_systype": "XYZ",
"mdl_title": "This string could be quite long",
}
]
I could use some pointers to how to coherce BC into matching up the pks (as it does for functions etc when comparing languages.
Three small sample records are pasted below. In this case mdl_pk is the key we'd like to align on.
Each record has a pk and we'd like BC to align the comparison by the pk.
If need be, we can inject a consistently named property to align on (eg RECORD_PK) and could probably arrange for it to be the first property in each record if that would help.
[
{
"mdl_auth_fk": "FA392775595B48C7A0198B3AFB83472D",
"mdl_id": "EP",
"mdl_instype_id": "ABC",
"mdl_order": 5,
"mdl_pk": "0236C75968424C2290DC5D295E86ABD4",
"mdl_prs_fk": "8973C2FEE6D34A8D9C7488AF31262EE6",
"mdl_systype": "XYZ",
"mdl_title": "This string could be quite long",
},
{
"mdl_auth_fk": "EE0D64533A134FDCA3B2746D4BE15377",
"mdl_id": "PD",
"mdl_instype_id": "ABC",
"mdl_order": 9,
"mdl_pk": "027C82A698FD4732A9E691C583CCC098",
"mdl_prs_fk": "8973C2FEE6D34A8D9C7488AF31262EE6",
"mdl_systype": "XYZ",
"mdl_title": "This string could be quite long",
"_mdl_pk_2009": 36
},
{
"mdl_auth_fk": "",
"mdl_id": "RPT",
"mdl_instype_id": "ABC",
"mdl_order": 10,
"mdl_pk": "06DAD869A9554E418AE426365BFFF775",
"mdl_prs_fk": "857D1F06BAE24BB3A3CE0D9DBE7DE890",
"mdl_systype": "XYZ",
"mdl_title": "This string could be quite long",
}
]
Comment