Return a columns name list and the query string

    Args:
        sql: SQL query or table name
        con: database connection or url string
        partition_column: column used to share the data between the workers

    Returns:
        Columns name list and query string

def get_query_info(sql, con, partition_column):
    """ Return a columns name list and the query string

    Args:
        sql: SQL query or table name
        con: database connection or url string
        partition_column: column used to share the data between the workers

    Returns:
        Columns name list and query string
    """
    engine = create_engine(con)
    if is_table(engine, sql):
        table_metadata = get_table_metadata(engine, sql)
        query = build_query_from_table(sql)
        cols = get_table_columns(table_metadata)
    else:
        check_query(sql)
        query = sql.replace(";", "")
        cols = get_query_columns(engine, query)
    # TODO allow validation that takes into account edge cases of pandas e.g. "[index]"
    # check_partition_column(partition_column, cols)
    cols_names = list(cols.keys())
    return cols_names, query