def fields_for_mapping(mapping):
    """Summarize the list of fields in a table mapping"""
    fields = []
    for sf_field, db_field in mapping.get("fields", {}).items():
        fields.append({"sf": sf_field, "db": db_field})
    for sf_field, lookup in mapping.get("lookups", {}).items():
        fields.append({"sf": sf_field, "db": lookup.get_lookup_key_field()})
    return fields