Skip to content

unpack_json result prefix, breaks "stats by" #671

@woehrl01

Description

@woehrl01

Describe the bug

The following query does not work, because stats by is only returning the total counts. Removing result_prefix "payload_details_" and using the original fields works as expected in that it returns the total count by identifier_code

system_log_type:="some.generic.log.event"
    | unpack_json from data_payload fields (nested.info.items) result_prefix "payload_details_"
    | unroll payload_details_nested.info.items
    | unpack_json payload_details_nested.info.items fields (identifier_code)
    | stats by (identifier_code) count()

To Reproduce

see above

Version

victoria-logs-v1.33.0

Logs

No response

Screenshots

No response

Used command-line flags

No response

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions