def get_source_key(source, row):
    """Gets source_key for source_entity from csv row"""
    key_fields = source.sourcefield_set.filter(is_primary_key=True)
    key_field_values = []
    for field in key_fields:
        key_field_values.append(row[field.name])
    return '-'.join(key_field_values)