def create_admin_tbl(datetime_now):
    mydb1 = mydb(postgres_db_connector)
    #insert admin tbl
    sql_insert = """
            insert into admin_control(tbl_name,scale_factor,db_format,database_name,test_case,global_config,local_config_gen,local_config_testing)
            values('%s',%d,'%s','%s','%s','%s','%s','%s')
    """%(datetime_now.replace('-','_'),
            local_config_testing()['tpcds_scale_factor'],
            str(local_config_testing()['db_format']).replace("'","''"),
            local_config_testing()['DATABASE_NAME'],
            '|'.join(local_config_testing()['test_case_list']),
          str(global_config).replace("'","''"),
          str(local_config_gen()).replace("'","''"),
          str(local_config_testing()).replace("'","''"))
    mydb1.runsql(sql_insert)
    mydb1.commit()
    mydb1.close()
 def init_db(self):
     self.mydb1 = mydb(postgres_db_connector)