from sql_queries import create_tables_list, drop_tables_list
import psycopg2




def drop_tables(cur, conn):
	for query in drop_tables_list:
		print(query+str("drop tables"))
		cur.execute(query)
		conn.commit()
		print("finish ------drop")

def create_tables(cur, conn):
	for query in create_tables_list:
		print("query"+str(query))
		cur.execute(query)
		conn.commit()
		print("finish-------query")


def main():
	values = ('airflowcluster.cen7uusy9typ.us-west-2.redshift.amazonaws.com', 'your cluster schema name', 'your master user name in cluster','your password', 5439)
	conn = psycopg2.connect("host={} dbname={} user={} password={} port={}".format(*values))
	cur = conn.cursor()

	drop_tables(cur, conn)
	create_tables(cur, conn)
	print("creation successfull")


if __name__ == '__main__':
	main()

be81ab4e49a04f3228263e016b31b9d3d3b7f142
<mask token>


def drop_tables(cur, conn):
    for query in drop_tables_list:
        print(query + str('drop tables'))
        cur.execute(query)
        conn.commit()
        print('finish ------drop')


def create_tables(cur, conn):
    for query in create_tables_list:
        print('query' + str(query))
        cur.execute(query)
        conn.commit()
        print('finish-------query')


<mask token>

<mask token>


def drop_tables(cur, conn):
    for query in drop_tables_list:
        print(query + str('drop tables'))
        cur.execute(query)
        conn.commit()
        print('finish ------drop')


def create_tables(cur, conn):
    for query in create_tables_list:
        print('query' + str(query))
        cur.execute(query)
        conn.commit()
        print('finish-------query')


def main():
    values = (
        'airflowcluster.cen7uusy9typ.us-west-2.redshift.amazonaws.com',
        'your cluster schema name', 'your master user name in cluster',
        'your password', 5439)
    conn = psycopg2.connect('host={} dbname={} user={} password={} port={}'
        .format(*values))
    cur = conn.cursor()
    drop_tables(cur, conn)
    create_tables(cur, conn)
    print('creation successfull')


<mask token>

<mask token>


def drop_tables(cur, conn):
    for query in drop_tables_list:
        print(query + str('drop tables'))
        cur.execute(query)
        conn.commit()
        print('finish ------drop')


def create_tables(cur, conn):
    for query in create_tables_list:
        print('query' + str(query))
        cur.execute(query)
        conn.commit()
        print('finish-------query')


def main():
    values = (
        'airflowcluster.cen7uusy9typ.us-west-2.redshift.amazonaws.com',
        'your cluster schema name', 'your master user name in cluster',
        'your password', 5439)
    conn = psycopg2.connect('host={} dbname={} user={} password={} port={}'
        .format(*values))
    cur = conn.cursor()
    drop_tables(cur, conn)
    create_tables(cur, conn)
    print('creation successfull')


if __name__ == '__main__':
    main()

from sql_queries import create_tables_list, drop_tables_list
import psycopg2


def drop_tables(cur, conn):
    for query in drop_tables_list:
        print(query + str('drop tables'))
        cur.execute(query)
        conn.commit()
        print('finish ------drop')


def create_tables(cur, conn):
    for query in create_tables_list:
        print('query' + str(query))
        cur.execute(query)
        conn.commit()
        print('finish-------query')


def main():
    values = (
        'airflowcluster.cen7uusy9typ.us-west-2.redshift.amazonaws.com',
        'your cluster schema name', 'your master user name in cluster',
        'your password', 5439)
    conn = psycopg2.connect('host={} dbname={} user={} password={} port={}'
        .format(*values))
    cur = conn.cursor()
    drop_tables(cur, conn)
    create_tables(cur, conn)
    print('creation successfull')


if __name__ == '__main__':
    main()

from sql_queries import create_tables_list, drop_tables_list
import psycopg2




def drop_tables(cur, conn):
	for query in drop_tables_list:
		print(query+str("drop tables"))
		cur.execute(query)
		conn.commit()
		print("finish ------drop")

def create_tables(cur, conn):
	for query in create_tables_list:
		print("query"+str(query))
		cur.execute(query)
		conn.commit()
		print("finish-------query")


def main():
	values = ('airflowcluster.cen7uusy9typ.us-west-2.redshift.amazonaws.com', 'your cluster schema name', 'your master user name in cluster','your password', 5439)
	conn = psycopg2.connect("host={} dbname={} user={} password={} port={}".format(*values))
	cur = conn.cursor()

	drop_tables(cur, conn)
	create_tables(cur, conn)
	print("creation successfull")


if __name__ == '__main__':
	main()
