Query Details

New Year Champagne Glass

Query

//Usage of datatable and make_list to create a silly glass

let line1 = datatable (name: string)
 [
 "✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨        " 
 ];
  let line2 = datatable (name: string)
 [
 "    ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨          " 
 ];
   let line3 = datatable (name: string)
 [
 "       ✨ ✨ ✨ ✨ ✨ ✨ ✨           " 
 ];
    let line4 = datatable (name: string)
 [
 "                      ✨✨               " 
 ];
     let line5 = datatable (name: string)
 [
 "                      ✨✨               " 
 ];
      let line6 = datatable (name: string)
 [
 "                      ✨✨               " 
 ];
       let line7 = datatable (name: string)
 [
 "       ✨ ✨ ✨ ✨ ✨ ✨ ✨           " 
 ];
 line1
 | union line2, line3, line4, line5, line6, line7
 | summarize mylist = make_list(name)
 | project Happy_New_Year=strcat_array(mylist, '\n')

Explanation

This query uses the "datatable" function to create multiple tables, each containing a single row with a string value. The "union" operator is then used to combine these tables into a single table. The "make_list" function is applied to the "name" column to create a list of all the string values. Finally, the "project" operator is used to concatenate the strings in the list with a newline character, resulting in the output "Happy_New_Year".

Details

Rod Trent profile picture

Rod Trent

Released: December 31, 2021

Tables

line1line2line3line4line5line6line7

Keywords

Datatable,make_list,union,summarize,project,strcat_array

Operators

datatableletunionsummarizemake_listprojectstrcat_array

Actions