Skip to content

Commit 16574a8

Browse files
committed
Add operation_src and resource_src columns to preserve original log data in detections
1 parent 269ec35 commit 16574a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

locals.pp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@
1919
tp_index as project,
2020
tp_id as source_id,
2121
-- Create new aliases to preserve original row data
22+
operation as operation_src,
23+
resource as resource_src,
2224
*
25+
exclude operation, resource
2326
EOQ
2427

2528
detection_sql_where_conditions = <<-EOQ
2629
and severity != 'Error'
2730
-- TODO: Do we need to check operation?
2831
-- and (operation_src is null or operation_src.last = true)
2932
EOQ
33+
3034
// Keep same order as SQL statement for easier readability
3135
detection_display_columns = [
3236
"timestamp",
@@ -41,4 +45,4 @@
4145

4246
locals {
4347
detection_sql_resource_column_resource_name = replace(local.detection_sql_columns, "__RESOURCE_SQL__", "resource_name")
44-
}
48+
}

0 commit comments

Comments
 (0)