def get_column_mappings(organization):
    from seed.utils.mapping import _get_column_names
    source_mappings = ColumnMapping.objects.filter(
        super_organization=organization
    )
    concat_confs = []
    mapping = {}
    for item in source_mappings:
        if not item.column_mapped.all().exists():
            continue
        key = _get_column_names(item)
        value = _get_column_names(item, attr_name='column_mapped')[0]

        if isinstance(key, list) and len(key) > 1:
            concat_confs.append({
                'concat_columns': key,
                'target': value,
                'delimiter': ' '
            })
            continue

        # These should be lists of one element each.
        mapping[key[0]] = value

    return mapping, concat_confs
Returns dict of all the column mappings for an Org's given source type
dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/models.py/get_column_mappings