def column_fullname(column, prefix=None):
    """Get a fully qualified name for a column

    Parameters
    ----------
    column : SQLAlchemy column
        A SQLAlchemy column object to get the full name for
    prefix : str, optional
        If specified, a manual prefix to prepend to the output string. This
        will automatically be separted with a ".".

    Returns
    -------
    str
        A fully qualified column name. The exact format will vary depending on
        your SQLAlchemy metadata, but an example would be: schema.table.column

    """
    name = '%s.%s' % (column.table.fullname, column.name)
    if prefix:
        name = prefix + '.' + name
    return name
