def validate_dataset(ds):
    """
    Check if all entries in this dataset have all the required fields
    Parameters
    ----------
    ds : dict
        Dictionary of datasets
    Raises
    ------
    ValueError: If a field is missing
    """
    req_fields = ['data_pattern', 'datadir', 'datatype', 'is_mc', 'notes',
        'run_list', 'run_number_prefix', 'system']
    for name, entry in list(ds.items()):
        for field in req_fields:
            if field not in list(entry.keys()):
                raise ValueError(
                    'Field `{}` missing in `{}` dataset definition'.format(
                    field, name))
        if isinstance(entry['run_list'], int):
            entry['run_list'] = str(entry['run_list'])
