'Runs query against sqla to retrieve some
sample values for the given column.'

def values_for_column(self, column_name, limit=10000):

    cols = {col.column_name: col for col in self.columns}
    target_col = cols[column_name]
    tp = self.get_template_processor()
    db_engine_spec = self.database.db_engine_spec
    qry = select([target_col.sqla_col]).select_from(self.get_from_clause(tp, db_engine_spec)).distinct(column_name)
    if limit:
        qry = qry.limit(limit)
    if self.fetch_values_predicate:
        tp = self.get_template_processor()
        qry = qry.where(tp.process_template(self.fetch_values_predicate))
    engine = self.database.get_sqla_engine()
    sql = '{}'.format(qry.compile(engine, compile_kwargs={'literal_binds': True}))
    df = pd.read_sql_query(sql=sql, con=engine)
    return [row[0] for row in df.to_records(index=False)]
