The generic post_data function is using the RCA specific validator
I found that RCA specific validator is being using with the generic post_data function (see picture below).
This is fine for the _validate_schema(...)
call inside the validate method, but not for the _validate_integrity(...)
method that has a set of column names that is for the RCA schema hard coded. This is going to miss any IDs in anything but RCA.
async def _validate_integrity(self, df: pd.DataFrame) -> dict:
"""Validate data integrity.
:param df: dataframe
:type df: pd.DataFrame
:return: missing records
:rtype: dict
"""
fields_with_ids = [
"RockSampleID",
"CoringID",
"WellboreID",
"SampleType",
"SampleDepth.UnitOfMeasure",
"NetConfiningStress.UnitOfMeasure",
"NetOverburdenPressure.UnitOfMeasure",
"ConfiningStress.UnitOfMeasure",
"Permeability.UnitOfMeasure",
"Permeability.Type",
"Porosity.UnitOfMeasure",
"Porosity.Type",
"GrainDensity.UnitOfMeasure",
"GrainDensity.Type",
"Saturation.Method",
]