Skip to content

Commit

Permalink
address code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hyi committed Feb 7, 2024
1 parent 9e26b9a commit 77585c6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions icees_api/features/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,9 @@ def create_cohort_view(conn, table_name, cohort_features):
"feature_name": key,
"feature_qualifier": {
"operator": value["operator"],
"value": value["value"],
} if "value" in value else {
# value only has two possible keys, value key for one value, and values key for a list of values
"operator": value["operator"],
# format value["values"] list into ("value1", "value2", ...,) for SQL IN operator query
"value": '("{}")'.format('\", \"'.join(value["values"])),
"value": value.get("value") or '("{}")'.format('\", \"'.join(value["values"])),
},
}
for key, value in cohort_features.items()
Expand Down

0 comments on commit 77585c6

Please sign in to comment.