Aug 16 2019
12:48 AM
- last edited on
Apr 07 2022
06:03 PM
by
TechCommunityAP
Aug 16 2019
12:48 AM
- last edited on
Apr 07 2022
06:03 PM
by
TechCommunityAP
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. (Something like columnifexists).
After using tableIfExists for all table, I need to do union of all table and fetch the results.
Could you please help me with the query?
Aug 16 2019 04:03 AM
Hi @Vino55,
I do not think this is possible. It is like you are trying to avoid exposing errors due to not only specific data being there but any data. What is the scenario here?
Aug 18 2019 07:16 AM
Aug 21 2019 06:26 AM - edited Aug 21 2019 06:26 AM
Currently most of the RP data (who are not onboarded to resource specific) move to AzureDiagnostics.
We are moving to Resource specific feature and due to which we are creating workflow in LA.
By this, LA workspace will always have our table with defined schema.
Hence this table will always exist in LA workspace when we query. if there is no data, LA is going to return 0 records but not error.
However, the workspace may or may not have table AzureDiagnostics. You can quickly check by creating a new workspace and you will not find table AzureDiagnostics. If there is no data, since table will not exist, LA will return error.
As our intent to combine data from both table (AzureDiagnostics and our new table) from our workbook, our customer workspace may or may not have AzureDiagnostic table. Hence we need to handle this in our query used in our workbook template.
I will try to follow @Ketan Ghelani 's suggestion.