Check that the data is a Mapping type with all schema defined fields
    validated as True.

    Parameters
    ----------
    datum: Any
        Data being validated
    schema: dict
        Schema
    parent_ns: str
        parent namespace
    raise_errors: bool
        If true, raises ValidationError on invalid data

def validate_record(datum, schema, parent_ns=None, raise_errors=True):
    """
    Check that the data is a Mapping type with all schema defined fields
    validated as True.

    Parameters
    ----------
    datum: Any
        Data being validated
    schema: dict
        Schema
    parent_ns: str
        parent namespace
    raise_errors: bool
        If true, raises ValidationError on invalid data
    """
    _, namespace = schema_name(schema, parent_ns)
    return (
        isinstance(datum, Mapping) and
        all(validate(datum=datum.get(f['name'], f.get('default', no_value)),
                     schema=f['type'],
                     field='{}.{}'.format(namespace, f['name']),
                     raise_errors=raise_errors)
            for f in schema['fields']
            )
    )