Issues icon indicating copy to clipboard operation
Issues copied to clipboard

Allow List of Strings as Payload data type

Open winsmith opened this issue 1 year ago • 1 comments

Every now and then we want to send more than just a single value for a payload key. For example, a list of user tags, or of enabled settings.

This can work similarly to the floatValue key, where a specific pre-determined payload key is given a different data type.

Querying this data type will work as druid native, i.e. comparing the property to a string will yield true if the string is one of the values in the list.

  • [ ] Enable list-of-strings field on the database level
  • [ ] Update ingest API to allow lists of strings
  • [ ] Update Swift SDK to send list of strings
  • [ ] Update Kotlin SDK to send list of strings
  • [ ] Update editor to allow displaying lists of strings

winsmith avatar Jan 22 '24 09:01 winsmith

This concept is great, it could be possible to simplify it a little and allow for simple separated tags (perhaps space) that you could use an extract function for the values, and allow grouping counts by those values. That way the clients need not send a different format for a list of strings, as the payload format remains the same.

Another option would be to allow REGEX on the payload key, and allow a group index on that regex to be treated as the value. e.g. TAG_OPTIONA - where you filter by keys starting with TAG, and the value is OPTIONA

blckmn avatar Jan 22 '24 21:01 blckmn