def transformer_class(source):
    """ Imports the transformer class for a data source """

    class_name = source['transformer']
    sub_mods = class_name.split(sep=".")
    module = __import__(".".join(sub_mods[:-1]), fromlist=sub_mods[-1])
    class_module = getattr(module, sub_mods[-1])
    return class_module