Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Azure Data Explorer – Projecting columns using parameters

I’m trying use the multi-select parameter to filter displayed columns on my dashboard. I have found multiple separate commands (things like bag-unpack, mv-expand, set_difference and so on), but I don’t have enough experience to put them all together. Please help, I’m new.

I’ve tried Googling different solutions, but I don’t know what I don’t know, so keyword search hasn’t proven fruitful. I wanted to ask the community at StackOverflow for their input.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Hi Dawid (whom I don’t know at all),

I had a similar project where I set up a parameter called _columnNames which is a dynamic list of column names in my table. I wanted to plot specified columns relative to time and this could be done using the following code:

{Table Name}

| project Time, pa = pack_all()

| project Time, cols = bag_remove_keys(pa, set_difference(bag_keys(pa), _columnNames))

| evaluate bag_unpack(cols)

where {Table Name} refers to the table name you ingested in Azure Data Explorer.
Hope this helps!

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading