Search code examples
azure-data-explorerkql

Can we make pack_all consider only non-null & non-empty columns


pack_all() function considers all the input columns while making a dynamic object. Is it possible to somehow force it to consider only non-empty & non-null columns? If not, is there any workaround to apply filter on top of the resulting dynamic value?


Solution

  • It should be added as a new answer, that pack_all() did in the meantime get a new option to exclude null/empty values

    pack_all([ignore_null_empty])

    ignore_null_empty: An optional bool indicating whether to ignore null/empty columns and exclude them from the resulting property bag. Default: false.

    https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/packallfunction