# -*- coding:UTF-8 -*-
# @Time  : 2020/8/19 11:47
# @File  : revise_table_data_to_table.py
# @email : litao@igengmei.com
# @author : litao
import pymysql


def con_sql(sql):
    # 从数据库的表里获取数据
    """
	:type sql : str
	:rtype : tuple
	"""
    db = pymysql.connect(host='172.16.50.175', port=3306, user='doris', passwd='o5gbA27hXHHm',
                         db='doris_olap')
    cursor = db.cursor()
    cursor.execute(sql)
    result = cursor.fetchall()
    db.close()
    return result


sql = "slect * from xxx"