Commit 37f37fbc authored by Dr.李's avatar Dr.李

revert change

parent 94c602da
......@@ -110,9 +110,9 @@ class SqlEngine(object):
def mapping_factors(factors):
factor_list = ','.join("'" + f + "'" for f in factors)
sql = "select factor, source from factor_master where factor in ({factor_list})".format(factor_list=factor_list)
sql = "select distinct factor, source from factor_master where factor in ({factor_list})".format(factor_list=factor_list)
results = self.engine.execute(sql).fetchall()
return ','.join(r[1].strip() + '.' + r[0].strip() + ' as ' + r[1].strip() + '$' + r[0].strip() for r in results)
return ','.join(r[1].strip() + '.' + r[0].strip() for r in results)
factor_str = mapping_factors(factors)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment