Forum Discussion
Vino55
Microsoft
Aug 16, 2019Query to know if table exists in LA workspace
I need to query LA workspace(s) and the query will include couple of tables. The LA workspace need not have all tables and hence I need to something like tableifExists and if true, query the table....
Ketan Ghelani
Aug 18, 2019Former Employee
You can use isfuzzy parameter in union clause. See the example
https://docs.microsoft.com/en-us/azure/kusto/query/unionoperator
// Using union isfuzzy=true to access non-existing view:
let View_1 = view () { print x=1 };
let View_2 = view () { print x=1 };
let OtherView_1 = view () { print x=1 };
union isfuzzy=true
(View_1 | where x > 0),
(View_2 | where x > 0),
(View_3 | where x > 0)
| count
https://docs.microsoft.com/en-us/azure/kusto/query/unionoperator
// Using union isfuzzy=true to access non-existing view:
let View_1 = view () { print x=1 };
let View_2 = view () { print x=1 };
let OtherView_1 = view () { print x=1 };
union isfuzzy=true
(View_1 | where x > 0),
(View_2 | where x > 0),
(View_3 | where x > 0)
| count