wip: better query for raw preview #1
Neur0toxine
commented 2023-11-15 12:45:21 +03:00
Owner
```sql
SELECT
visitParamExtractString(message, 'time') as time,
visitParamExtractString(message, 'level') as level,
visitParamExtractString(message, 'connection') as connection,
visitParamExtractString(message, 'account') as account,
visitParamExtractString(message, 'handler') as handler,
visitParamExtractString(message, 'msg') as msg,
JSONExtractRaw(message, arrayFilter((v) -> v NOT IN ('time', 'level', 'connection', 'account', 'handler', 'msg'), JSONExtractKeys(message))) as raw,
arrayFilter((v) -> v NOT IN ('time', 'level', 'connection', 'account', 'handler', 'msg'), JSONExtractKeys(message)) as raw2
FROM "default"."log_docker_raw"
WHERE ( logdatetime >= $__fromTime AND logdatetime <= $__toTime )
AND IF('Any' IN (${priority}), 1 = 1, level IN (${priority}))
AND ( program = ${program:singlequote} )
AND ( message LIKE '%$filter1%' )
AND ( message LIKE '%$filter2%' )
AND ( message LIKE '%$filter3%' )
AND ( msg <> '' )
ORDER BY logdatetime DESC LIMIT 5000
```
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?