Skip to content

Commit

Permalink
event_time column in alerts table should now get populated properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Butzi authored and sfc-gh-afedorov committed Oct 30, 2018
1 parent 026887d commit 6a0f9cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/alert_queries_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def log_alerts(ctx, alerts):
format_string = ", ".join(["(%s)"] * len(alerts))
try:
ctx.cursor().execute((
f'INSERT INTO {ALERTS_TABLE}(alert_time, alert) '
f'SELECT PARSE_JSON(column1):ALERT_TIME, PARSE_JSON(column1) '
f'INSERT INTO {ALERTS_TABLE}(alert_time, event_time, alert) '
f'SELECT PARSE_JSON(column1):ALERT_TIME, PARSE_JSON(column1):EVENT_TIME, PARSE_JSON(column1) '
f'FROM values {format_string};'),
alerts)
except Exception as e:
Expand Down

0 comments on commit 6a0f9cf

Please sign in to comment.