Skip to content

Commit

Permalink
add indices for features
Browse files Browse the repository at this point in the history
  • Loading branch information
xu-hao committed Jul 18, 2020
1 parent 0ad9379 commit 97b1ab2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dbutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def truncate(a, length=63):
Index(truncate(table + "_year"), tables[table].c.year).create(conn)
cols = list(map(lambda a : a[0], table_features))
for feature in cols:
Index(truncate(table + "_" + feature), tables[table].c[feature]).create(conn)
Index(truncate(table + "_year_" + feature), tables[table].c.year, tables[table].c[feature]).create(conn)
# for feature2 in cols:
# Index(truncate(table + "_year_" + feature + "_" + feature2), tables[table].c.year, tables[table].c[feature], tables[table].c[feature2]).create(conn)
Expand Down

0 comments on commit 97b1ab2

Please sign in to comment.