Skip to content

Commit

Permalink
remove refreshagg before score
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloarocha committed Nov 20, 2023
1 parent 83424b3 commit 770a76c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions routes/outlier_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ def generateOutliers(idSegment, fold=None, idDrug=None, clean=None):
result = db.engine.execute(queryDelete)
print("RowCount Delete Drug", result.rowcount)

queryRefresh = text(
f"""
insert into {user.schema}.prescricaoagg
select * from {user.schema}.prescricaoagg where fkmedicamento = :idDrug and idsegmento = :idSegment
"""
)

result = db.engine.execute(
queryRefresh, {"idSegment": idSegment, "idDrug": idDrug}
)
print("RowCount Refresg Agg", result.rowcount)
# queryRefresh = text(
# f"""
# insert into {user.schema}.prescricaoagg
# select * from {user.schema}.prescricaoagg where fkmedicamento = :idDrug and idsegmento = :idSegment
# """
# )

# result = db.engine.execute(
# queryRefresh, {"idSegment": idSegment, "idDrug": idDrug}
# )
# print("RowCount Refresg Agg", result.rowcount)

queryInsert = text(
"""
Expand Down

0 comments on commit 770a76c

Please sign in to comment.